From 12198dddb748867bdd7144ba3a2565f36a0b2356 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Fri, 26 Jul 2024 16:42:05 +0800 Subject: [PATCH] chore: update dotenv --- frontend/appflowy_tauri/src-tauri/Cargo.lock | 34 +++++++++---------- frontend/appflowy_tauri/src-tauri/Cargo.toml | 2 +- frontend/appflowy_tauri/src-tauri/src/init.rs | 2 +- frontend/appflowy_tauri/src-tauri/src/main.rs | 2 +- .../appflowy_web_app/src-tauri/Cargo.lock | 24 ++++++------- .../appflowy_web_app/src-tauri/src/init.rs | 2 +- .../appflowy_web_app/src-tauri/src/main.rs | 2 +- .../event-integration-test/tests/util.rs | 6 ++-- .../flowy-server/tests/af_cloud_test/util.rs | 2 +- .../flowy-server/tests/supabase_test/util.rs | 4 +-- 10 files changed, 40 insertions(+), 40 deletions(-) diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index a30c5132ca..96f926cfff 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "app-error" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bincode", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "appflowy-ai-client" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bytes", @@ -247,7 +247,7 @@ name = "appflowy_tauri" version = "0.0.0" dependencies = [ "bytes", - "dotenv", + "dotenvy", "flowy-chat", "flowy-config", "flowy-core", @@ -826,7 +826,7 @@ dependencies = [ [[package]] name = "client-api" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "again", "anyhow", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "client-api-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "collab-entity", "collab-rt-entity", @@ -888,7 +888,7 @@ dependencies = [ [[package]] name = "client-websocket" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "futures-channel", "futures-util", @@ -1128,7 +1128,7 @@ dependencies = [ [[package]] name = "collab-rt-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bincode", @@ -1153,7 +1153,7 @@ dependencies = [ [[package]] name = "collab-rt-protocol" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "async-trait", @@ -1417,7 +1417,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa 1.0.6", - "phf 0.8.0", + "phf 0.11.2", "smallvec", ] @@ -1528,7 +1528,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "database-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", @@ -1741,10 +1741,10 @@ dependencies = [ ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "downcast-rs" @@ -3034,7 +3034,7 @@ dependencies = [ [[package]] name = "gotrue" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "futures-util", @@ -3051,7 +3051,7 @@ dependencies = [ [[package]] name = "gotrue-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", @@ -3483,7 +3483,7 @@ dependencies = [ [[package]] name = "infra" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bytes", @@ -6027,7 +6027,7 @@ dependencies = [ [[package]] name = "shared-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 1a26f66887..d1c543bd43 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -95,8 +95,8 @@ flowy-notification = { path = "../../rust-lib/flowy-notification", features = [ uuid = "1.5.0" tauri-plugin-deep-link = "0.1.2" -dotenv = "0.15.0" semver = "1.0.23" +dotenvy = "0.15.7" [features] # by default Tauri runs in production mode diff --git a/frontend/appflowy_tauri/src-tauri/src/init.rs b/frontend/appflowy_tauri/src-tauri/src/init.rs index 7591ba37ff..67b1b8a03c 100644 --- a/frontend/appflowy_tauri/src-tauri/src/init.rs +++ b/frontend/appflowy_tauri/src-tauri/src/init.rs @@ -3,7 +3,7 @@ use flowy_core::{AppFlowyCore, DEFAULT_NAME}; use lib_dispatch::runtime::AFPluginRuntime; use std::sync::Arc; -use dotenv::dotenv; +use dotenvy::dotenv; pub fn read_env() { dotenv().ok(); diff --git a/frontend/appflowy_tauri/src-tauri/src/main.rs b/frontend/appflowy_tauri/src-tauri/src/main.rs index 6a69de07fd..fc25ed403d 100644 --- a/frontend/appflowy_tauri/src-tauri/src/main.rs +++ b/frontend/appflowy_tauri/src-tauri/src/main.rs @@ -16,7 +16,7 @@ use init::*; use notification::*; use request::*; use tauri::Manager; -extern crate dotenv; +extern crate dotenvy; fn main() { tauri_plugin_deep_link::prepare(DEEP_LINK_SCHEME); diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index 3935849100..126acefb7f 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "app-error" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bincode", @@ -183,7 +183,7 @@ dependencies = [ [[package]] name = "appflowy-ai-client" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bytes", @@ -800,7 +800,7 @@ dependencies = [ [[package]] name = "client-api" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "again", "anyhow", @@ -850,7 +850,7 @@ dependencies = [ [[package]] name = "client-api-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "collab-entity", "collab-rt-entity", @@ -862,7 +862,7 @@ dependencies = [ [[package]] name = "client-websocket" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "futures-channel", "futures-util", @@ -1111,7 +1111,7 @@ dependencies = [ [[package]] name = "collab-rt-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bincode", @@ -1136,7 +1136,7 @@ dependencies = [ [[package]] name = "collab-rt-protocol" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "async-trait", @@ -1518,7 +1518,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "database-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", @@ -3101,7 +3101,7 @@ dependencies = [ [[package]] name = "gotrue" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "futures-util", @@ -3118,7 +3118,7 @@ dependencies = [ [[package]] name = "gotrue-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", @@ -3555,7 +3555,7 @@ dependencies = [ [[package]] name = "infra" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "bytes", @@ -6091,7 +6091,7 @@ dependencies = [ [[package]] name = "shared-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c2a839ba8bf9ead44679eb08f3a9680467b767ca#c2a839ba8bf9ead44679eb08f3a9680467b767ca" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=762e558d72b11c01d78d407dbebb7c15099ecc55#762e558d72b11c01d78d407dbebb7c15099ecc55" dependencies = [ "anyhow", "app-error", diff --git a/frontend/appflowy_web_app/src-tauri/src/init.rs b/frontend/appflowy_web_app/src-tauri/src/init.rs index 42c857abdf..1e11d5fb08 100644 --- a/frontend/appflowy_web_app/src-tauri/src/init.rs +++ b/frontend/appflowy_web_app/src-tauri/src/init.rs @@ -3,7 +3,7 @@ use flowy_core::{AppFlowyCore, DEFAULT_NAME}; use lib_dispatch::runtime::AFPluginRuntime; use std::sync::Arc; -use dotenv::dotenv; +use dotenvy::dotenv; pub fn read_env() { dotenv().ok(); diff --git a/frontend/appflowy_web_app/src-tauri/src/main.rs b/frontend/appflowy_web_app/src-tauri/src/main.rs index 6a69de07fd..fc25ed403d 100644 --- a/frontend/appflowy_web_app/src-tauri/src/main.rs +++ b/frontend/appflowy_web_app/src-tauri/src/main.rs @@ -16,7 +16,7 @@ use init::*; use notification::*; use request::*; use tauri::Manager; -extern crate dotenv; +extern crate dotenvy; fn main() { tauri_plugin_deep_link::prepare(DEEP_LINK_SCHEME); diff --git a/frontend/rust-lib/event-integration-test/tests/util.rs b/frontend/rust-lib/event-integration-test/tests/util.rs index ad1a01bcff..0a5b7b92b1 100644 --- a/frontend/rust-lib/event-integration-test/tests/util.rs +++ b/frontend/rust-lib/event-integration-test/tests/util.rs @@ -34,7 +34,7 @@ use flowy_user_pub::cloud::UserCloudService; use flowy_user_pub::entities::Authenticator; pub fn get_supabase_config() -> Option { - dotenv::from_path(".env.ci").ok()?; + dotenvy::from_path(".env.ci").ok()?; SupabaseConfiguration::from_env().ok() } @@ -80,13 +80,13 @@ pub async fn receive_with_timeout(mut receiver: Receiver, duration: Durati } pub fn get_supabase_ci_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; SupabaseConfiguration::from_env().ok() } #[allow(dead_code)] pub fn get_supabase_dev_config() -> Option { - dotenv::from_filename("./.env.dev").ok()?; + dotenvy::from_filename("./.env.dev").ok()?; SupabaseConfiguration::from_env().ok() } diff --git a/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs b/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs index 71dacfab04..1a8eb5b709 100644 --- a/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs +++ b/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs @@ -22,7 +22,7 @@ use crate::setup_log; /// - `GOTRUE_ADMIN_EMAIL=admin@example.com` /// - `GOTRUE_ADMIN_PASSWORD=password` pub fn get_af_cloud_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; setup_log(); AFCloudConfiguration::from_env().ok() } diff --git a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs index 7fba91fe9a..78803a0256 100644 --- a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs +++ b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs @@ -23,14 +23,14 @@ use lib_infra::future::FutureResult; use crate::setup_log; pub fn get_supabase_ci_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; setup_log(); SupabaseConfiguration::from_env().ok() } #[allow(dead_code)] pub fn get_supabase_dev_config() -> Option { - dotenv::from_filename("./.env.dev").ok()?; + dotenvy::from_filename("./.env.dev").ok()?; setup_log(); SupabaseConfiguration::from_env().ok() }