From e287e4c301d201faf481a0de254478613b3cea5a Mon Sep 17 00:00:00 2001 From: Michael Cooper Date: Tue, 11 Jun 2024 14:55:50 -0700 Subject: [PATCH] tweak format of project identifiers in deploy --- src/deploy.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/deploy.ts b/src/deploy.ts index 387ef7ec7..fcb335a9c 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -312,10 +312,15 @@ class Deployer { if (!deployTarget.create) { // Check last deployed state. If it's not the same project, ask the user if // they want to continue anyways. In non-interactive mode just cancel. - const targetDescription = `${deployTarget.project.title} (@${deployTarget.workspace.login}/${deployTarget.project.slug})`; + const targetDescription = `${deployTarget.project.title} (${deployTarget.project.slug}) in the @${deployTarget.workspace.login} workspace`; if (deployConfig.projectId && deployConfig.projectId !== deployTarget.project.id) { this.effects.clack.log.warn( - `The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold(targetDescription)}.` + wrapAnsi( + `The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold( + targetDescription + )}.`, + this.effects.outputColumns + ) ); if (this.effects.isTty) { const choice = await this.effects.clack.confirm({ @@ -333,10 +338,13 @@ class Deployer { throw new CliError("Cancelling deploy due to misconfiguration."); } } else if (deployConfig.projectId) { - this.effects.clack.log.info(`Deploying to ${bold(targetDescription)}.`); + this.effects.clack.log.info(wrapAnsi(`Deploying to ${bold(targetDescription)}.`, this.effects.outputColumns)); } else { this.effects.clack.log.warn( - `The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.` + wrapAnsi( + `The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.`, + this.effects.outputColumns + ) ); if (this.effects.isTty) { const choice = await this.effects.clack.confirm({