diff --git a/.github/workflows/publish-macros.yml b/.github/workflows/publish-macros.yml index bf329271..48270b29 100644 --- a/.github/workflows/publish-macros.yml +++ b/.github/workflows/publish-macros.yml @@ -1,4 +1,4 @@ -name: Publish eventstore-macros +name: Publish kurrentdb-macros on: workflow_dispatch: @@ -7,26 +7,21 @@ jobs: publish: runs-on: ubuntu-latest environment: CRATES_IO_TOKEN - permissions: - id-token: write steps: - uses: actions/checkout@v4 - name: Verify version is new run: | LOCAL=$(cargo metadata --no-deps --format-version 1 \ - | jq -r '.packages[] | select(.name=="eventstore-macros") | .version') - REMOTE=$(cargo search eventstore-macros --limit 1 \ - | sed -nE 's/^eventstore-macros = "([^"]+)".*/\1/p') + | jq -r '.packages[] | select(.name=="kurrentdb-macros") | .version') + REMOTE=$(cargo search kurrentdb-macros --limit 1 \ + | sed -nE 's/^kurrentdb-macros = "([^"]+)".*/\1/p') echo "local=$LOCAL remote=$REMOTE" if [ "$LOCAL" = "$REMOTE" ]; then - echo "Version $LOCAL is already published on crates.io. Bump eventstore-macros/Cargo.toml first." + echo "Version $LOCAL is already published on crates.io. Bump kurrentdb-macros/Cargo.toml first." exit 1 fi - - uses: rust-lang/crates-io-auth-action@v1 - id: auth - - - run: cargo publish -p eventstore-macros + - run: cargo publish -p kurrentdb-macros env: - CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index a6e69054..9786f6e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,6 @@ members = [ "kurrentdb-extras", # internals - "eventstore-macros", + "kurrentdb-macros", "examples" ] diff --git a/eventstore-macros/Cargo.toml b/kurrentdb-macros/Cargo.toml similarity index 78% rename from eventstore-macros/Cargo.toml rename to kurrentdb-macros/Cargo.toml index e44e181c..c9bb2e31 100644 --- a/eventstore-macros/Cargo.toml +++ b/kurrentdb-macros/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "eventstore-macros" -version = "0.0.2" +name = "kurrentdb-macros" +version = "0.0.1" edition = "2021" license = "MIT" -description = "Extra KurrentDB gRPC client internal code generation features" +description = "Internal proc-macros for the KurrentDB Rust client" keywords = ["database", "eventsourcing", "eventstore", "kurrent", "grpc"] repository = "https://github.com/kurrent-io/KurrentDB-Client-Rust" categories = ["database", "api-bindings"] diff --git a/eventstore-macros/src/lib.rs b/kurrentdb-macros/src/lib.rs similarity index 100% rename from eventstore-macros/src/lib.rs rename to kurrentdb-macros/src/lib.rs diff --git a/kurrentdb/Cargo.toml b/kurrentdb/Cargo.toml index f1b14ca5..1613c56b 100755 --- a/kurrentdb/Cargo.toml +++ b/kurrentdb/Cargo.toml @@ -28,7 +28,7 @@ chrono = { version = "0.4", default-features = false, features = [ "serde", "now", ] } -eventstore-macros = { path = "../eventstore-macros", version = "0.0.2" } +kurrentdb-macros = { path = "../kurrentdb-macros", version = "0.0.1" } futures = "0.3" http = "1" hyper = { version = "1", features = ["client"] } diff --git a/kurrentdb/src/operations/mod.rs b/kurrentdb/src/operations/mod.rs index c9e7ca7f..2f5ffd08 100644 --- a/kurrentdb/src/operations/mod.rs +++ b/kurrentdb/src/operations/mod.rs @@ -1,5 +1,5 @@ -use eventstore_macros::{options, streaming}; use futures::stream::TryStreamExt; +use kurrentdb_macros::{options, streaming}; use std::time::SystemTime; use std::{collections::HashMap, time::Duration}; diff --git a/kurrentdb/src/options/append_to_stream.rs b/kurrentdb/src/options/append_to_stream.rs index 8c7e6429..b86a1fca 100644 --- a/kurrentdb/src/options/append_to_stream.rs +++ b/kurrentdb/src/options/append_to_stream.rs @@ -1,7 +1,7 @@ use crate::event_store::client::streams::append_req::options::ExpectedStreamRevision; use crate::private::Sealed; use crate::{EventData, StreamState}; -use eventstore_macros::options; +use kurrentdb_macros::options; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/batch_append.rs b/kurrentdb/src/options/batch_append.rs index 6ba44747..74a1f7d3 100644 --- a/kurrentdb/src/options/batch_append.rs +++ b/kurrentdb/src/options/batch_append.rs @@ -1,4 +1,4 @@ -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; options! { #[derive(Clone, Default)] diff --git a/kurrentdb/src/options/delete_stream.rs b/kurrentdb/src/options/delete_stream.rs index 20282fd3..31eb355a 100644 --- a/kurrentdb/src/options/delete_stream.rs +++ b/kurrentdb/src/options/delete_stream.rs @@ -1,5 +1,5 @@ use crate::StreamState; -use eventstore_macros::options; +use kurrentdb_macros::options; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/persistent_subscription.rs b/kurrentdb/src/options/persistent_subscription.rs index 0315d50d..cbb03e0f 100644 --- a/kurrentdb/src/options/persistent_subscription.rs +++ b/kurrentdb/src/options/persistent_subscription.rs @@ -2,7 +2,7 @@ use crate::{ PersistentSubscriptionSettings, Position, StreamPosition, SubscriptionFilter, SystemConsumerStrategy, }; -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; use std::time::Duration; options! { diff --git a/kurrentdb/src/options/projections.rs b/kurrentdb/src/options/projections.rs index 89035d0f..b2711ff6 100644 --- a/kurrentdb/src/options/projections.rs +++ b/kurrentdb/src/options/projections.rs @@ -1,4 +1,4 @@ -use eventstore_macros::options; +use kurrentdb_macros::options; options! { #[derive(Clone, Default)] diff --git a/kurrentdb/src/options/read_all.rs b/kurrentdb/src/options/read_all.rs index d8a72710..f1e8229a 100644 --- a/kurrentdb/src/options/read_all.rs +++ b/kurrentdb/src/options/read_all.rs @@ -1,5 +1,5 @@ use crate::{Position, ReadDirection, StreamPosition, SubscriptionFilter}; -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/read_stream.rs b/kurrentdb/src/options/read_stream.rs index 8ff045ef..2d63bc44 100644 --- a/kurrentdb/src/options/read_stream.rs +++ b/kurrentdb/src/options/read_stream.rs @@ -1,5 +1,5 @@ use crate::{ReadDirection, StreamPosition}; -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/subscribe_to_all.rs b/kurrentdb/src/options/subscribe_to_all.rs index e34faddc..8cb3a2cc 100644 --- a/kurrentdb/src/options/subscribe_to_all.rs +++ b/kurrentdb/src/options/subscribe_to_all.rs @@ -1,6 +1,6 @@ use crate::options::retry::RetryOptions; use crate::{Position, StreamPosition, SubscriptionFilter}; -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/subscribe_to_stream.rs b/kurrentdb/src/options/subscribe_to_stream.rs index 98d18c34..c98c2b0c 100644 --- a/kurrentdb/src/options/subscribe_to_stream.rs +++ b/kurrentdb/src/options/subscribe_to_stream.rs @@ -1,6 +1,6 @@ use crate::StreamPosition; use crate::options::retry::RetryOptions; -use eventstore_macros::{options, streaming}; +use kurrentdb_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/tombstone_stream.rs b/kurrentdb/src/options/tombstone_stream.rs index a611b7f0..725296d2 100644 --- a/kurrentdb/src/options/tombstone_stream.rs +++ b/kurrentdb/src/options/tombstone_stream.rs @@ -1,5 +1,5 @@ use crate::StreamState; -use eventstore_macros::options; +use kurrentdb_macros::options; options! { #[derive(Clone)]