From 64e9bf5c59fdb10f815a853aa2d041a814e0e2c8 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Mon, 16 Sep 2024 10:02:25 -0700 Subject: [PATCH 1/3] Export 'app' in v2 entrypoint. Fixes https://github.com/firebase/firebase-tools/issues/7637. --- src/v2/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v2/index.ts b/src/v2/index.ts index 0684c364e..16c7311ce 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -77,3 +77,6 @@ export { params }; // NOTE: Required to support the Functions Emulator which monkey patches `functions.config()` // TODO(danielylee): Remove in next major release. export { config } from "../v1/config"; + +import { setApp as setEmulatedAdminApp } from "../common/app"; +export const app = { setEmulatedAdminApp }; From 4cdc3fab09e6efab2dac12f9943e966e365b32d2 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Mon, 16 Sep 2024 10:07:15 -0700 Subject: [PATCH 2/3] Add changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb..01db4f8f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fix bug where v1 functions can't be emulated (#1615) From ca89f7b0799adac7d5ed3627b720c18b7bc1ada4 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Mon, 16 Sep 2024 10:08:01 -0700 Subject: [PATCH 3/3] Add comment --- src/v2/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v2/index.ts b/src/v2/index.ts index 16c7311ce..10076ce7c 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -78,5 +78,6 @@ export { params }; // TODO(danielylee): Remove in next major release. export { config } from "../v1/config"; +// Required for v1 Emulator support. import { setApp as setEmulatedAdminApp } from "../common/app"; export const app = { setEmulatedAdminApp };