diff --git a/src/dataconnect/build.ts b/src/dataconnect/build.ts index 96555b79c7f..8f9bde7f7d3 100644 --- a/src/dataconnect/build.ts +++ b/src/dataconnect/build.ts @@ -32,13 +32,13 @@ export async function build( (w) => w.extensions?.warningLevel && w.extensions?.warningLevel === "REQUIRE_ACK", ); const choices = [ - { name: "Accept all changes and proceed", value: "proceed" }, + { name: "Acknowledge all changes and proceed", value: "proceed" }, { name: "Reject changes and abort", value: "abort" }, ]; if (requiredAcks.length) { utils.logLabeledWarning( "dataconnect", - `There are changes in your schema or connectors that may break your existing applications. These changes require explicit acknowledgement to deploy:\n` + + `There are changes in your schema or connectors that may break your existing applications. These changes require explicit acknowledgement to proceed. You may either reject the changes and update your sources with the suggested workaround(s), if any, or acknowledge these changes and proceed with the deployment:\n` + requiredAcks.map(prettifyWithWorkaround).join("\n"), ); if (options.nonInteractive && !options.force) { @@ -47,7 +47,7 @@ export async function build( ); } else if (!options.nonInteractive && !options.force && !dryRun) { const result = await promptOnce({ - message: "Would you like to proceed with these changes?", + message: "Would you like to proceed with these breaking changes?", type: "list", choices, default: "abort", diff --git a/src/dataconnect/graphqlError.ts b/src/dataconnect/graphqlError.ts index 740028c5696..03948c6f58e 100644 --- a/src/dataconnect/graphqlError.ts +++ b/src/dataconnect/graphqlError.ts @@ -1,3 +1,4 @@ +import * as clc from "colorette"; import { GraphqlError } from "./types"; export function prettify(err: GraphqlError): string { @@ -16,9 +17,9 @@ export function prettifyWithWorkaround(err: GraphqlError): string { if (!err.extensions?.workarounds?.length) { return prettify(err); } - let prettified = prettify(err); + let prettified = `\n${clc.bold("Issue:")} ${prettify(err)}`; for (const w of err.extensions.workarounds) { - prettified += `\nWorkaround: ${w.Description}\nReason: ${w.Reason}`; + prettified += `\n${clc.bold("Workaround:")} ${w.Description}\n${clc.bold("Reason:")} ${w.Reason}`; } return prettified; } diff --git a/src/options.ts b/src/options.ts index 6f45a090fd1..45814867e0c 100644 --- a/src/options.ts +++ b/src/options.ts @@ -21,7 +21,7 @@ export interface BaseOptions { account?: string; json: boolean; nonInteractive: boolean; - interactive: boolean; // deprecated, use nonInteractive instead + interactive: boolean; debug: boolean; rc: RC;