Skip to content

Commit

Permalink
Address some review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosalyntan committed Dec 30, 2024
1 parent b053edb commit 49e88a2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/dataconnect/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export async function build(
): Promise<DeploymentMetadata> {
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);
Expand All @@ -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" },
Expand All @@ -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({

Check warning on line 54 in src/dataconnect/build.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
Expand Down

0 comments on commit 49e88a2

Please sign in to comment.