Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/commands/gxgames/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;

Expand Down
8 changes: 5 additions & 3 deletions src/commands/gxgames/commands/publish-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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`);
}
6 changes: 5 additions & 1 deletion src/commands/gxgames/commands/upload-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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`);
}
Loading