From 5dfc06373eaf49dc8ae7600c09ea2557aae1ef66 Mon Sep 17 00:00:00 2001 From: kevmoo Date: Tue, 31 Mar 2026 21:24:25 -0700 Subject: [PATCH] feat: add Cloud Run services link for Dart functions deployment Add a link to the Cloud Run services dashboard when deploying Dart functions, as they do not yet show up in the Firebase Console. Ran `npm run lint:changed-files` and `npm run build` to verify changes are lint-free and compile successfully. `firebase deploy --only functions` --- src/deploy/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/deploy/index.ts b/src/deploy/index.ts index f0c28f4a5ed..f84bebbf362 100644 --- a/src/deploy/index.ts +++ b/src/deploy/index.ts @@ -21,6 +21,7 @@ import * as AppHostingTarget from "./apphosting"; import * as AuthTarget from "./auth"; import { prepareFrameworks } from "../frameworks"; import { Context as HostingContext } from "./hosting/context"; +import { Context as FunctionsContext } from "./functions/args"; import { addPinnedFunctionsToOnlyString, hasPinnedFunctions } from "./hosting/prepare"; import { isRunningInGithubAction } from "../utils"; import { TARGET_PERMISSIONS } from "../commands/deploy"; @@ -198,6 +199,19 @@ export const deploy = async function ( const deployedHosting = includes(targetNames, "hosting"); logger.info(bold("Project Console:"), consoleUrl(options.project ?? "_", "/overview")); + + // TODO: Remove this temporary Cloud Run link once Dart support lands in the Firebase Console. + const fContext = context as FunctionsContext; + const hasDartFunctions = Object.values(fContext.codebaseDeployEvents ?? {}).some( + (e) => e.runtime && typeof e.runtime === "string" && e.runtime.startsWith("dart"), + ); + if (hasDartFunctions && projectId) { + logger.info( + bold("Cloud Run services:"), + `https://console.cloud.google.com/run/services?project=${projectId}`, + ); + } + if (deployedHosting) { each(context.hosting?.deploys, (deploy) => { logger.info(bold("Hosting URL:"), addSubdomain(hostingOrigin(), deploy.config.site));