From 49e88a29d7e8585b41d77976c6145cadcbc4c5ee Mon Sep 17 00:00:00 2001 From: Rosalyn Tan Date: Mon, 30 Dec 2024 12:09:49 -0500 Subject: [PATCH] Address some review comments. --- src/dataconnect/build.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/dataconnect/build.ts b/src/dataconnect/build.ts index 7146d68737e..92c3177cb49 100644 --- a/src/dataconnect/build.ts +++ b/src/dataconnect/build.ts @@ -14,7 +14,12 @@ export async function build( ): Promise { const args: { configDir: string; projectId?: string } = { configDir }; if (experiments.isEnabled("fdcconnectorevolution") && options.projectId) { - process.env["DATA_CONNECT_PREVIEW"] = "conn_evolution"; + const flags = process.env["DATA_CONNECT_PREVIEW"]; + if (flags) { + process.env["DATA_CONNECT_PREVIEW"] = flags + ",conn_evolution"; + } else { + process.env["DATA_CONNECT_PREVIEW"] = "conn_evolution"; + } args.projectId = options.projectId; } const buildResult = await DataConnectEmulator.build(args); @@ -26,10 +31,10 @@ export async function build( ); } const interactiveAcks = buildResult.errors.filter( - (w) => w.extensions?.warningLevel && w.extensions?.warningLevel === "INTERACTIVE_ACK", + (w) => w.extensions?.warningLevel === "INTERACTIVE_ACK", ); const requiredAcks = buildResult.errors.filter( - (w) => w.extensions?.warningLevel && w.extensions?.warningLevel === "REQUIRE_ACK", + (w) => w.extensions?.warningLevel === "REQUIRE_ACK", ); const choices = [ { name: "Acknowledge all changes and proceed", value: "proceed" }, @@ -43,7 +48,7 @@ export async function build( ); if (options.nonInteractive && !options.force) { throw new FirebaseError( - "Explicit acknowledgement required for breaking schema or connector changes.", + "Explicit acknowledgement required for breaking schema or connector changes. Rerun this command with --force to deploy these changes.", ); } else if (!options.nonInteractive && !options.force && !dryRun) { const result = await promptOnce({