Skip to content

Commit

Permalink
feat: added UI/UX improvements to start command
Browse files Browse the repository at this point in the history
  • Loading branch information
neoandmatrix committed Jan 22, 2025
1 parent 3867411 commit 707b57d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/models/Studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import chokidar from 'chokidar';
import open from 'open';
import path from 'path';
import { version as studioVersion } from '@asyncapi/studio/package.json';
import { gray } from 'picocolors';
import { blueBright,redBright } from 'picocolors';

const { readFile, writeFile } = fPromises;

Expand Down Expand Up @@ -110,10 +110,11 @@ export function start(filePath: string, port: number = DEFAULT_PORT): void {

server.listen(port, () => {
const url = `http://localhost:${port}?liveServer=${port}&studio-version=${studioVersion}`;
console.log(`Studio is now running at ${url}.`);
console.log(`You can open this URL in your web browser, and if needed, press ${gray('Ctrl + C')} to stop the process.`);
console.log(`🎉 Connected to Live Server running at ${blueBright(url)}.`);
console.log(`🌐 Open this URL in your web browser: ${blueBright(url)}`);
console.log(`🛑 If needed, press ${redBright('Ctrl + C')} to stop the process.`);
if (filePath) {
console.log(`Watching changes on file ${filePath}`);
console.log(`👁️ Watching changes on file ${blueBright(filePath)}`);
} else {
console.warn(
'Warning: No file was provided, and we couldn\'t find a default file (like "asyncapi.yaml" or "asyncapi.json") in the current folder. Starting Studio with a blank workspace.'
Expand Down

0 comments on commit 707b57d

Please sign in to comment.