@@ -21,7 +21,7 @@ import {
21
21
} from './impl/discovery' ;
22
22
import { fixHostname , makeUrl } from './impl/url' ;
23
23
import { HostAndPort } from './public_types' ;
24
- import { fetch as undiciFetch } from 'undici ' ;
24
+ import fetch from 'node-fetch ' ;
25
25
26
26
/**
27
27
* Run a setup function with background Cloud Functions triggers disabled. This can be used to
@@ -79,13 +79,12 @@ export async function withFunctionTriggersDisabled<TResult>(
79
79
hub . host = fixHostname ( hub . host ) ;
80
80
makeUrl ( hub , '/functions/disableBackgroundTriggers' ) ;
81
81
// Disable background triggers
82
- const disableRes = await undiciFetch (
82
+ const disableRes = await fetch (
83
83
makeUrl ( hub , '/functions/disableBackgroundTriggers' ) ,
84
84
{
85
85
method : 'PUT'
86
86
}
87
87
) ;
88
-
89
88
if ( ! disableRes . ok ) {
90
89
throw new Error (
91
90
`HTTP Error ${ disableRes . status } when disabling functions triggers, are you using firebase-tools 8.13.0 or higher?`
@@ -98,7 +97,7 @@ export async function withFunctionTriggersDisabled<TResult>(
98
97
result = await maybeFn ( ) ;
99
98
} finally {
100
99
// Re-enable background triggers
101
- const enableRes = await undiciFetch (
100
+ const enableRes = await fetch (
102
101
makeUrl ( hub , '/functions/enableBackgroundTriggers' ) ,
103
102
{
104
103
method : 'PUT'
0 commit comments