File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed
packages/mcp-server-supabase/src Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -628,9 +628,7 @@ describe('tools', () => {
628
628
service : invalidService ,
629
629
} ,
630
630
} ) ;
631
- await expect ( getLogsPromise ) . rejects . toThrow (
632
- `unsupported log service type: invalid-service`
633
- ) ;
631
+ await expect ( getLogsPromise ) . rejects . toThrow ( 'Invalid enum value' ) ;
634
632
} ) ;
635
633
636
634
test ( 'create branch' , async ( ) => {
Original file line number Diff line number Diff line change @@ -178,16 +178,13 @@ export function createSupabaseMcpServer(options: SupabaseMcpServerOptions) {
178
178
) ,
179
179
organization_id : z . string ( ) ,
180
180
confirm_cost_id : z
181
- . string ( )
181
+ . string ( {
182
+ required_error :
183
+ 'User must confirm understanding of costs before creating a project.' ,
184
+ } )
182
185
. describe ( 'The cost confirmation ID. Call `confirm_cost` first.' ) ,
183
186
} ) ,
184
187
execute : async ( { name, region, organization_id, confirm_cost_id } ) => {
185
- if ( ! confirm_cost_id ) {
186
- throw new Error (
187
- 'User must confirm understanding of costs before creating a project.'
188
- ) ;
189
- }
190
-
191
188
const cost = await getNextProjectCost (
192
189
managementApiClient ,
193
190
organization_id
@@ -513,16 +510,13 @@ export function createSupabaseMcpServer(options: SupabaseMcpServerOptions) {
513
510
. default ( 'develop' )
514
511
. describe ( 'Name of the branch to create' ) ,
515
512
confirm_cost_id : z
516
- . string ( )
513
+ . string ( {
514
+ required_error :
515
+ 'User must confirm understanding of costs before creating a branch.' ,
516
+ } )
517
517
. describe ( 'The cost confirmation ID. Call `confirm_cost` first.' ) ,
518
518
} ) ,
519
519
execute : async ( { project_id, name, confirm_cost_id } ) => {
520
- if ( ! confirm_cost_id ) {
521
- throw new Error (
522
- 'User must confirm understanding of costs before creating a branch.'
523
- ) ;
524
- }
525
-
526
520
const cost = getBranchCost ( ) ;
527
521
const costHash = await hashObject ( cost ) ;
528
522
if ( costHash !== confirm_cost_id ) {
You can’t perform that action at this time.
0 commit comments