firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.03k stars 202 forks source link

Expose functions.config in the v2 namespace to avoid breaking the Functions Emulator #1607

Closed taeold closed 2 months ago

taeold commented 2 months ago

Unforutnately, Functions Emulator monkey-patches the functions.config() method.

Not exposing the config() method in the default namespace crashes the functions emulator 😢 .

https://github.com/firebase/firebase-tools/blob/0e2ab54c522d40ec9fe874e108332427e4886e0a/src/emulator/functionsEmulatorRuntime.ts#L717

In the near future, we'll make monkey-patching robust in the emulator to not crash when functions.config() method is missing