mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
056e2d49d0
* chore: env config * chore: get user workspace * feat: enable postgres storage * chore: add new env * chore: add set env ffi * chore: pass env before backend init * chore: update * fix: ci tests * chore: commit the generate env file * chore: remove unused import
46 lines
1.0 KiB
Dart
46 lines
1.0 KiB
Dart
// lib/env/env.dart
|
|
import 'package:envied/envied.dart';
|
|
|
|
part 'env.g.dart';
|
|
|
|
@Envied(path: '.env')
|
|
abstract class Env {
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_URL',
|
|
defaultValue: '',
|
|
)
|
|
static final supabaseUrl = _Env.supabaseUrl;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_ANON_KEY',
|
|
defaultValue: '',
|
|
)
|
|
static final supabaseAnonKey = _Env.supabaseAnonKey;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_KEY',
|
|
defaultValue: '',
|
|
)
|
|
static final supabaseKey = _Env.supabaseKey;
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_JWT_SECRET',
|
|
defaultValue: '',
|
|
)
|
|
static final supabaseJwtSecret = _Env.supabaseJwtSecret;
|
|
|
|
@EnviedField(
|
|
obfuscate: true,
|
|
varName: 'SUPABASE_COLLAB_TABLE',
|
|
defaultValue: '',
|
|
)
|
|
static final supabaseCollabTable = _Env.supabaseCollabTable;
|
|
}
|
|
|
|
bool get isSupabaseEnable =>
|
|
Env.supabaseUrl.isNotEmpty &&
|
|
Env.supabaseAnonKey.isNotEmpty &&
|
|
Env.supabaseKey.isNotEmpty &&
|
|
Env.supabaseJwtSecret.isNotEmpty;
|