using PCL.Core.Utils.Exts; using PCL.Core.Utils.OS; namespace PCL.Core.App; // ReSharper disable InconsistentNaming public static class Secrets { /// /// 微软 OAuth 的 Client ID /// public static string MSOAuthClientId { get; } = EnvironmentInterop.GetSecret("MS_CLIENT_ID", readEnvDebugOnly: true).ReplaceNullOrEmpty(); /// /// CurseForge API 的 Client ID /// public static string CurseForgeAPIKey { get; } = EnvironmentInterop.GetSecret("CURSEFORGE_API_KEY", readEnvDebugOnly: true).ReplaceNullOrEmpty(); /// /// 遥测密钥 /// public static string TelemetryKey { get; } = EnvironmentInterop.GetSecret("TELEMETRY_KEY", readEnvDebugOnly: true).ReplaceNullOrEmpty(); /// /// Natayark ID OAuth 的 Client ID /// public static string NatayarkClientId { get; } = EnvironmentInterop.GetSecret("NAID_CLIENT_ID", readEnvDebugOnly: true).ReplaceNullOrEmpty(); /// /// Natayark ID OAuth 的 Client ID /// public static string NatayarkClientSecret { get; } = EnvironmentInterop.GetSecret("NAID_CLIENT_SECRET", readEnvDebugOnly: true).ReplaceNullOrEmpty(); /// /// 联机根服务器 /// public static string[] LinkServers { get; } = EnvironmentInterop.GetSecret("LINK_SERVER_ROOT", readEnvDebugOnly: true).ReplaceNullOrEmpty().Split("|"); /// /// 当前版本的 Git 提交 SHA /// public static string CommitHash { get; } = EnvironmentInterop.GetSecret("GITHUB_SHA", readEnvDebugOnly: true).ReplaceNullOrEmpty(); }