From eeccd95bb10fb18357e6cce0de7845395fa23c5e Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Wed, 6 Dec 2023 17:42:10 +0900 Subject: [PATCH] Finishing touches on the logged messages. --- src/init/features/frameworks/index.ts | 7 +++---- src/init/features/frameworks/repo.ts | 13 +++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/init/features/frameworks/index.ts b/src/init/features/frameworks/index.ts index 21ae156425a..1a42ae475d0 100644 --- a/src/init/features/frameworks/index.ts +++ b/src/init/features/frameworks/index.ts @@ -54,10 +54,10 @@ export async function doSetup(setup: any, projectId: string): Promise { const backend: Backend | undefined = await getOrCreateBackend(projectId, setup); if (backend) { - logSuccess(`Successfully created backend:\n ${backend.name}`); - logSuccess(`Your site is being deployed at:\n https://${backend.uri}\n`); + logSuccess(`Successfully created backend:\n\t${backend.name}`); + logSuccess(`Your site is being deployed at:\n\thttps://${backend.uri}`); logSuccess( - `View the rollout status by running:\n firebase backends:get --backend=${backend.name}\n` + `View the rollout status by running:\n\tfirebase backends:get --backend=${backend.name}` ); } } @@ -96,7 +96,6 @@ export async function getOrCreateBackend( setup.frameworks ); const backendDetails = toBackend(cloudBuildConnRepo); - logBullet(clc.bold(`${clc.white("===")} Creating your backend`)); return await createBackend(projectId, location, backendDetails, setup.frameworks.serviceName); } else { throw new FirebaseError( diff --git a/src/init/features/frameworks/repo.ts b/src/init/features/frameworks/repo.ts index c792a6e1793..8cc346c418c 100644 --- a/src/init/features/frameworks/repo.ts +++ b/src/init/features/frameworks/repo.ts @@ -79,7 +79,7 @@ export async function linkGitHubRepository( projectId: string, location: string ): Promise { - utils.logBullet(clc.bold(`${clc.yellow("===")} Connect a GitHub repository`)); + utils.logBullet(clc.bold(`${clc.yellow("===")} Set up a GitHub connection`)); const existingConns = await listFrameworksConnections(projectId); if (existingConns.length < 1) { const grantSuccess = await promptSecretManagerAdminGrant(projectId); @@ -123,7 +123,8 @@ export async function linkGitHubRepository( appInstallationId: connection.githubConfig?.appInstallationId, }); const repo = await getOrCreateRepository(projectId, location, connectionId, remoteUri); - utils.logSuccess(`Successfully linked GitHub repository at remote URI:\n ${remoteUri}`); + utils.logSuccess(`Successfully linked GitHub repository at remote URI`); + utils.logSuccess(`\t${remoteUri}`); return repo; } @@ -197,13 +198,13 @@ async function promptSecretManagerAdminGrant(projectId: string): Promise { - utils.logBullet("You must authorize the Cloud Build GitHub app.\n"); + utils.logBullet("You must authorize the Cloud Build GitHub app."); utils.logBullet("Sign in to GitHub and authorize Cloud Build GitHub app:"); const { url, cleanup } = await utils.openInBrowserPopup( conn.installationState.actionUri, "Authorize the GitHub app" ); - utils.logBullet(`\t${url}\n`); + utils.logBullet(`\t${url}`); await promptOnce({ type: "input", message: "Press Enter once you have authorized the app", @@ -214,9 +215,9 @@ async function promptConnectionAuth(conn: gcb.Connection): Promise { - utils.logBullet("Now, install the Cloud Build GitHub app:"); + utils.logBullet("Install the Cloud Build GitHub app to enable access to GitHub repositories"); const targetUri = conn.installationState.actionUri.replace("install_v2", "direct_install_v2"); - utils.logBullet(`\t${targetUri}`); + utils.logBullet(targetUri); await utils.openInBrowser(targetUri); await promptOnce({ type: "input",