Skip to content

Commit

Permalink
fix(ast): Add missing switch case
Browse files Browse the repository at this point in the history
Adds a missing switch case in the proto interop code.
  • Loading branch information
dnys1 committed Oct 10, 2024
1 parent fac14b0 commit 5454df0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/celest_ast/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.3

- fix: Add missing switch case

## 0.1.2

- Initial version.
8 changes: 7 additions & 1 deletion packages/celest_ast/lib/src/resolved_ast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/celest_ast/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
25 changes: 25 additions & 0 deletions packages/celest_ast/test/celest_ast_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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': [
Expand Down

0 comments on commit 5454df0

Please sign in to comment.