diff --git a/Cargo.lock b/Cargo.lock index 563b1dc2..6a103938 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -431,7 +431,7 @@ dependencies = [ [[package]] name = "apibara-sink-console" -version = "0.5.0" +version = "0.6.0" dependencies = [ "apibara-core", "apibara-observability", @@ -450,7 +450,7 @@ dependencies = [ [[package]] name = "apibara-sink-mongo" -version = "0.8.0" +version = "0.9.0" dependencies = [ "apibara-core", "apibara-observability", @@ -491,7 +491,7 @@ dependencies = [ [[package]] name = "apibara-sink-parquet" -version = "0.6.0" +version = "0.7.0" dependencies = [ "apibara-core", "apibara-observability", @@ -514,7 +514,7 @@ dependencies = [ [[package]] name = "apibara-sink-postgres" -version = "0.7.0" +version = "0.8.0" dependencies = [ "apibara-core", "apibara-observability", @@ -536,7 +536,7 @@ dependencies = [ [[package]] name = "apibara-sink-webhook" -version = "0.6.0" +version = "0.7.0" dependencies = [ "apibara-core", "apibara-observability", diff --git a/script/src/script.rs b/script/src/script.rs index 301bd521..2ce6b177 100644 --- a/script/src/script.rs +++ b/script/src/script.rs @@ -362,6 +362,7 @@ impl Script { } fn default_permissions(options: &ScriptOptions) -> Result { + let allow_env = options.allow_env.clone().map(remove_empty_strings); // If users use an empty hostname, allow all hosts. let allow_net = options.allow_net.clone().map(remove_empty_strings); let allow_read = options.allow_read.clone().map(|paths| { @@ -378,7 +379,7 @@ impl Script { }); match Permissions::from_options(&PermissionsOptions { - allow_env: options.allow_env.clone(), + allow_env, allow_hrtime: true, allow_net, allow_read, diff --git a/sinks/sink-console/CHANGELOG.md b/sinks/sink-console/CHANGELOG.md index f3aaf295..c302a3af 100644 --- a/sinks/sink-console/CHANGELOG.md +++ b/sinks/sink-console/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Common Changelog](https://common-changelog.org/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.0] - 2024-06-10 + +_Simplify access to all environment variables._ + +### Changed + +- If the argument to `--allow-env-from-env` is an empty string, grant access to + all environment variables. + ## [0.5.0] - 2024-04-09 _Support Starknet 0.13.1 and the new RPC 0.7.1 data._ diff --git a/sinks/sink-console/Cargo.toml b/sinks/sink-console/Cargo.toml index dad2d4a8..7754f604 100644 --- a/sinks/sink-console/Cargo.toml +++ b/sinks/sink-console/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apibara-sink-console" -version = "0.5.0" +version = "0.6.0" edition.workspace = true authors.workspace = true repository.workspace = true diff --git a/sinks/sink-mongo/CHANGELOG.md b/sinks/sink-mongo/CHANGELOG.md index 49b14683..8f321336 100644 --- a/sinks/sink-mongo/CHANGELOG.md +++ b/sinks/sink-mongo/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Common Changelog](https://common-changelog.org/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.0] - 2024-06-10 + +_Simplify access to all environment variables._ + +### Changed + +- If the argument to `--allow-env-from-env` is an empty string, grant access to + all environment variables. + ## [0.8.0] - 2024-04-09 _Support Starknet 0.13.1 and the new RPC 0.7.1 data._ diff --git a/sinks/sink-mongo/Cargo.toml b/sinks/sink-mongo/Cargo.toml index 0fb953cd..3eef8042 100644 --- a/sinks/sink-mongo/Cargo.toml +++ b/sinks/sink-mongo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apibara-sink-mongo" -version = "0.8.0" +version = "0.9.0" edition.workspace = true authors.workspace = true repository.workspace = true diff --git a/sinks/sink-parquet/CHANGELOG.md b/sinks/sink-parquet/CHANGELOG.md index b2a4f163..a937cc20 100644 --- a/sinks/sink-parquet/CHANGELOG.md +++ b/sinks/sink-parquet/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Common Changelog](https://common-changelog.org/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.0] - 2024-06-10 + +_Simplify access to all environment variables._ + +### Changed + +- If the argument to `--allow-env-from-env` is an empty string, grant access to + all environment variables. + ## [0.6.0] - 2024-04-09 _Support Starknet 0.13.1 and the new RPC 0.7.1 data._ diff --git a/sinks/sink-parquet/Cargo.toml b/sinks/sink-parquet/Cargo.toml index 80b8fa39..e667d488 100644 --- a/sinks/sink-parquet/Cargo.toml +++ b/sinks/sink-parquet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apibara-sink-parquet" -version = "0.6.0" +version = "0.7.0" edition.workspace = true authors.workspace = true repository.workspace = true diff --git a/sinks/sink-postgres/CHANGELOG.md b/sinks/sink-postgres/CHANGELOG.md index 64766650..f15b32e7 100644 --- a/sinks/sink-postgres/CHANGELOG.md +++ b/sinks/sink-postgres/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Common Changelog](https://common-changelog.org/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.0] - 2024-06-10 + +_Simplify access to all environment variables._ + +### Changed + +- If the argument to `--allow-env-from-env` is an empty string, grant access to + all environment variables. + ## [0.7.0] - 2024-04-09 _Support Starknet 0.13.1 and the new RPC 0.7.1 data._ diff --git a/sinks/sink-postgres/Cargo.toml b/sinks/sink-postgres/Cargo.toml index 725ae8db..20be3893 100644 --- a/sinks/sink-postgres/Cargo.toml +++ b/sinks/sink-postgres/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apibara-sink-postgres" -version = "0.7.0" +version = "0.8.0" edition.workspace = true authors.workspace = true repository.workspace = true diff --git a/sinks/sink-webhook/CHANGELOG.md b/sinks/sink-webhook/CHANGELOG.md index 8597a9f5..fab0561b 100644 --- a/sinks/sink-webhook/CHANGELOG.md +++ b/sinks/sink-webhook/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Common Changelog](https://common-changelog.org/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.0] - 2024-06-10 + +_Simplify access to all environment variables._ + +### Changed + +- If the argument to `--allow-env-from-env` is an empty string, grant access to + all environment variables. + ## [0.6.0] - 2024-04-09 _Support Starknet 0.13.1 and the new RPC 0.7.1 data._ diff --git a/sinks/sink-webhook/Cargo.toml b/sinks/sink-webhook/Cargo.toml index d29b04a7..a43a41bc 100644 --- a/sinks/sink-webhook/Cargo.toml +++ b/sinks/sink-webhook/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apibara-sink-webhook" -version = "0.6.0" +version = "0.7.0" edition.workspace = true authors.workspace = true repository.workspace = true diff --git a/starknet/Cargo.toml b/starknet/Cargo.toml index 34aaebe2..31479b8f 100644 --- a/starknet/Cargo.toml +++ b/starknet/Cargo.toml @@ -14,6 +14,10 @@ path = "src/lib.rs" name = "apibara-starknet" path = "src/bin.rs" +[features] +default = ["jemalloc"] +jemalloc = ["dep:jemallocator"] + [dependencies] apibara-core = { path = "../core" } apibara-node = { path = "../node" } @@ -48,9 +52,7 @@ tracing.workspace = true tracing-futures.workspace = true url = "2.2.2" warp.workspace = true - -[target.'cfg(not(windows))'.dependencies] -jemallocator.workspace = true +jemallocator = { workspace = true, optional = true } [dev-dependencies] apibara-core = { path = "../core" } diff --git a/starknet/src/bin.rs b/starknet/src/bin.rs index b0ac373f..66b43b45 100644 --- a/starknet/src/bin.rs +++ b/starknet/src/bin.rs @@ -4,7 +4,7 @@ use clap::{Parser, Subcommand}; use error_stack::{Result, ResultExt}; use tokio_util::sync::CancellationToken; -#[cfg(not(windows))] +#[cfg(feature = "jemalloc")] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;