Skip to content

Commit

Permalink
Finishing touches on the logged messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
taeold committed Dec 6, 2023
1 parent f0f8daa commit 1fe80a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/init/features/frameworks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export async function doSetup(setup: any, projectId: string): Promise<void> {
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}`
);
}
}
Expand Down Expand Up @@ -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(
Expand Down
13 changes: 7 additions & 6 deletions src/init/features/frameworks/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function linkGitHubRepository(
projectId: string,
location: string
): Promise<gcb.Repository> {
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);
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -197,13 +198,13 @@ async function promptSecretManagerAdminGrant(projectId: string): Promise<Boolean
}

async function promptConnectionAuth(conn: gcb.Connection): Promise<gcb.Connection> {
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",
Expand All @@ -214,9 +215,9 @@ async function promptConnectionAuth(conn: gcb.Connection): Promise<gcb.Connectio
}

async function promptAppInstall(conn: gcb.Connection): Promise<gcb.Connection> {
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",
Expand Down

0 comments on commit 1fe80a0

Please sign in to comment.