diff --git a/packages/celest_ast/CHANGELOG.md b/packages/celest_ast/CHANGELOG.md index 10a629c..b744412 100644 --- a/packages/celest_ast/CHANGELOG.md +++ b/packages/celest_ast/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.3 + +- fix: Add missing switch case + ## 0.1.2 - Initial version. diff --git a/packages/celest_ast/lib/src/resolved_ast.dart b/packages/celest_ast/lib/src/resolved_ast.dart index 6d91ceb..419e334 100644 --- a/packages/celest_ast/lib/src/resolved_ast.dart +++ b/packages/celest_ast/lib/src/resolved_ast.dart @@ -655,7 +655,13 @@ sealed class ResolvedExternalAuthProvider implements Node { return switch (proto.type) { pb.ResolvedExternalAuthProvider_Type.FIREBASE => ResolvedFirebaseExternalAuthProvider.fromProto(proto), - _ => throw ArgumentError.value(proto.type, 'proto.type', 'Invalid type'), + pb.ResolvedExternalAuthProvider_Type.SUPABASE => + ResolvedSupabaseExternalAuthProvider.fromProto(proto), + final unknown => throw ArgumentError.value( + unknown.name, + 'proto.type', + 'Invalid type', + ), }; } diff --git a/packages/celest_ast/pubspec.yaml b/packages/celest_ast/pubspec.yaml index 2737bf8..b5ca4d9 100644 --- a/packages/celest_ast/pubspec.yaml +++ b/packages/celest_ast/pubspec.yaml @@ -1,6 +1,6 @@ name: celest_ast description: A structured representation of Celest project and service definitions. -version: 0.1.2 +version: 0.1.3 homepage: https://celest.dev repository: https://github.com/celest-dev/celest/tree/main/packages/celest_ast diff --git a/packages/celest_ast/test/celest_ast_test.dart b/packages/celest_ast/test/celest_ast_test.dart index a8bc780..e021a68 100644 --- a/packages/celest_ast/test/celest_ast_test.dart +++ b/packages/celest_ast/test/celest_ast_test.dart @@ -74,6 +74,17 @@ void main() { value: 'test-123', ), ), + ResolvedSupabaseExternalAuthProvider( + authProviderId: 'supabase', + projectUrl: ResolvedVariable( + name: 'SUPABASE_URL', + value: 'https://test.supabase.co', + ), + jwtSecret: ResolvedSecret( + name: 'SUPABASE_JWT_SECRET', + value: 'jwt-secret', + ), + ), ], ), variables: [ @@ -178,6 +189,20 @@ void main() { }, }, }, + { + 'authProviderId': 'supabase', + 'type': 'SUPABASE', + 'supabase': { + 'projectUrl': { + 'name': 'SUPABASE_URL', + 'value': 'https://test.supabase.co', + }, + 'jwtSecret': { + 'name': 'SUPABASE_JWT_SECRET', + 'value': 'jwt-secret', + }, + }, + }, ], }, 'variables': [