From 91dca37d0ab41f69735922cb96b6a3534dbd2689 Mon Sep 17 00:00:00 2001 From: Duane Irvin Date: Thu, 7 May 2026 10:29:24 +0200 Subject: [PATCH] Log opened urls --- src/commands/gxgames/auth/index.ts | 6 ++++-- src/commands/gxgames/commands/publish-impl.ts | 8 +++++--- src/commands/gxgames/commands/upload-impl.ts | 6 +++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/commands/gxgames/auth/index.ts b/src/commands/gxgames/auth/index.ts index 342082d..16392aa 100644 --- a/src/commands/gxgames/auth/index.ts +++ b/src/commands/gxgames/auth/index.ts @@ -15,6 +15,7 @@ */ import { KnownError } from "~/error"; +import chalk from "chalk"; import crypto from "node:crypto"; import type { Context } from "~/context"; import type { TaskLogger } from "~/log"; @@ -130,10 +131,11 @@ class Auth { server.listen(this.redirectPort); }); - await this.config.open(authUrl.toString()); + const authUrlStr = authUrl.toString(); + await this.config.open(authUrlStr); const log = this.config.makeTaskLogger("Authenticating"); - log.message("Waiting for browser login..."); + log.message(`Opening ${chalk.blue.underline(authUrlStr)}`); const { code, sendPage } = await codePromise; diff --git a/src/commands/gxgames/commands/publish-impl.ts b/src/commands/gxgames/commands/publish-impl.ts index c003235..32c0a5f 100644 --- a/src/commands/gxgames/commands/publish-impl.ts +++ b/src/commands/gxgames/commands/publish-impl.ts @@ -15,7 +15,7 @@ */ import type { Context } from "~/context"; -import * as p from "@clack/prompts"; +import chalk from "chalk"; import { KnownError } from "~/error"; import type { ProjectPath } from "~/project"; @@ -48,6 +48,8 @@ export default async function ( } publishLog.success("Game published!"); - p.log.info(`Opening game page...`); - await this.open(`https://gx.games/games/${link.gameId}`); + + const url = `https://gx.games/games/${link.gameId}`; + await this.open(url); + this.process.stdout.write(`Opening ${chalk.blue.underline(url)}\n`); } diff --git a/src/commands/gxgames/commands/upload-impl.ts b/src/commands/gxgames/commands/upload-impl.ts index be24142..4d4c339 100644 --- a/src/commands/gxgames/commands/upload-impl.ts +++ b/src/commands/gxgames/commands/upload-impl.ts @@ -16,6 +16,7 @@ import type { Context } from "~/context"; import * as p from "@clack/prompts"; +import chalk from "chalk"; import { getApiClient } from "../api"; import { createAuthManager } from "../auth"; import { KnownError } from "~/error"; @@ -72,5 +73,8 @@ export default async function ( throw new KnownError(res.errors); } uploadLog.success("Bundle uploaded"); - await this.open(`https://dev.gx.games/games/${link.gameId}/publish-updates`); + + const url = `https://dev.gx.games/games/${link.gameId}/publish-updates`; + await this.open(url); + this.process.stdout.write(`Opening ${chalk.blue.underline(url)}\n`); }