File tree Expand file tree Collapse file tree 6 files changed +127
-102
lines changed Expand file tree Collapse file tree 6 files changed +127
-102
lines changed Original file line number Diff line number Diff line change 108108 "@electric-sql/pglite" : " ^0.3.3" ,
109109 "@electric-sql/pglite-tools" : " ^0.2.8" ,
110110 "@google-cloud/cloud-sql-connector" : " ^1.3.3" ,
111- "@google-cloud/pubsub" : " ^4.5 .0" ,
111+ "@google-cloud/pubsub" : " ^4.11 .0" ,
112112 "@inquirer/prompts" : " ^7.4.0" ,
113113 "@modelcontextprotocol/sdk" : " ^1.10.2" ,
114114 "abort-controller" : " ^3.0.0" ,
210210 "@types/mock-fs" : " 4.13.4" ,
211211 "@types/multer" : " ^1.4.3" ,
212212 "@types/node" : " ^18.19.1" ,
213- "@types/node-fetch" : " ^2.5.12 " ,
213+ "@types/node-fetch" : " ^2.6.13 " ,
214214 "@types/pg" : " ^8.11.2" ,
215215 "@types/progress" : " ^2.0.3" ,
216216 "@types/react" : " ^18.2.58" ,
Original file line number Diff line number Diff line change @@ -365,7 +365,12 @@ export class Client {
365365 }
366366
367367 if ( options . signal ) {
368- fetchOptions . signal = options . signal ;
368+ const signal = options . signal as any ;
369+ signal . reason = "" ;
370+ signal . throwIfAborted = ( ) => {
371+ throw new FirebaseError ( "Aborted" ) ;
372+ } ;
373+ fetchOptions . signal = signal ;
369374 }
370375
371376 let reqTimeout : NodeJS . Timeout | undefined ;
@@ -374,7 +379,12 @@ export class Client {
374379 reqTimeout = setTimeout ( ( ) => {
375380 controller . abort ( ) ;
376381 } , options . timeout ) ;
377- fetchOptions . signal = controller . signal ;
382+ const signal = controller . signal as any ;
383+ signal . reason = "" ;
384+ signal . throwIfAborted = ( ) => {
385+ throw new FirebaseError ( "Aborted" ) ;
386+ } ;
387+ fetchOptions . signal = signal ;
378388 }
379389
380390 if ( typeof options . body === "string" || isStream ( options . body ) ) {
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import {
3838 BlockingFunctionEvents ,
3939} from "./state" ;
4040import { MfaEnrollments , Schemas } from "./types" ;
41+ import { FirebaseError } from "../../error" ;
4142
4243/**
4344 * Create a map from IDs to operations handlers suitable for exegesis.
@@ -3130,11 +3131,16 @@ async function fetchBlockingFunction(
31303131 let status : number ;
31313132 let text : string ;
31323133 try {
3134+ const signal = controller . signal as any ;
3135+ signal . reason = "" ;
3136+ signal . throwIfAborted = ( ) => {
3137+ throw new FirebaseError ( "Aborted" ) ;
3138+ } ;
31333139 const res = await fetch ( url , {
31343140 method : "POST" ,
31353141 headers : { "Content-Type" : "application/json" } ,
31363142 body : JSON . stringify ( reqBody ) ,
3137- signal : controller . signal ,
3143+ signal,
31383144 } ) ;
31393145 ok = res . ok ;
31403146 status = res . status ;
You can’t perform that action at this time.
0 commit comments