Skip to content

Commit a756b74

Browse files
Release (#103)
2 parents f37a6b1 + 38c755d commit a756b74

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

.changeset/honest-glasses-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eth-tech-tree": patch
3+
---
4+
5+
updated colors for readability

src/actions/submit-challenge.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function submitChallenge(name: string, contractAddress?: string) {
3232
}
3333
console.log("Failing tests:", Object.keys(failingTests).length);
3434
for (const testName in failingTests) {
35-
console.log(chalk.blue(testName), chalk.red(failingTests[testName].reason));
35+
console.log(chalk.blueBright(testName), chalk.red(failingTests[testName].reason));
3636
}
3737
console.log("");
3838
console.log("Challenge failed tests. See output above for details.");

src/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Open up the challenge in your favorite code editor and follow the instructions i
245245

246246

247247
if (isHeader) {
248-
return `${depth}${chalk.blue(label)}`;
248+
return `${depth}${chalk.blueBright(label)}`;
249249
} else if (!unlocked) {
250250
return `${depth}${chalk.dim(chalk.dim(label))}`;
251251
} else if (isChallenge) {
@@ -382,9 +382,9 @@ Open up the challenge in your favorite code editor and follow the instructions i
382382
}
383383

384384
private printMenu(): void {
385-
const border = chalk.blue("─");
386-
const borderLeft = chalk.blue("●─");
387-
const borderRight = chalk.blue("─●");
385+
const border = chalk.blueBright("─");
386+
const borderLeft = chalk.blueBright("●─");
387+
const borderRight = chalk.blueBright("─●");
388388
const currentViewName = this.nodeLabel || "Main Menu";
389389
const user = this.userState.ens || this.userState.address;
390390
const completedChallenges = this.userState.challenges
@@ -400,7 +400,7 @@ Open up the challenge in your favorite code editor and follow the instructions i
400400
const width = process.stdout.columns;
401401
const userInfo = `${chalk.green(user)} ${chalk.yellow(`(${points} points)`)}`;
402402
const topMenuText = chalk.bold(`${borderLeft}${currentViewName}${new Array(width - (stripAnsi(currentViewName).length + stripAnsi(userInfo).length + 4)).fill(border).join('')}${userInfo}${borderRight}`);
403-
const bottomMenuText = chalk.bold(`${borderLeft}${chalk.bgBlueBright(`<q>`)} to quit | ${chalk.bgBlueBright(`<Esc>`)} to go back | ${chalk.bgBlueBright(`<p>`)} view progress | ${chalk.bgBlueBright(`<l>`)} leaderboard${new Array(width - 72).fill(border).join('')}${borderRight}`);
403+
const bottomMenuText = chalk.bold(`${borderLeft}${chalk.bgGreen(`<q>`)} to quit | ${chalk.bgGreen(`<Esc>`)} to go back | ${chalk.bgGreen(`<p>`)} view progress | ${chalk.bgGreen(`<l>`)} leaderboard${new Array(width - 72).fill(border).join('')}${borderRight}`);
404404

405405
// Save cursor position
406406
process.stdout.write('\x1B7');

src/tasks/render-intro-message.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ async function checkTerminalSize(): Promise<void> {
5656
}
5757

5858
export const TITLE_TEXT = `${chalk.green('╔═══════════════════════════════════════════════════════════════╗')}
59-
${chalk.green('║')}${chalk.blue(' ▗▄▄▄▖▗▄▄▄▖▗▖ ▗▖ ▗▄▄▄▖▗▄▄▄▖ ▗▄▄▖▗▖ ▗▖ ▗▄▄▄▖▗▄▄▖ ▗▄▄▄▖▗▄▄▄▖ ')}${chalk.green('║')}
60-
${chalk.green('║')}${chalk.blue(' ▐▌ █ ▐▌ ▐▌ █ ▐▌ ▐▌ ▐▌ ▐▌ █ ▐▌ ▐▌▐▌ ▐▌ ')}${chalk.green('║')}
61-
${chalk.green('║')}${chalk.blue(' ▐▛▀▀▘ █ ▐▛▀▜▌ █ ▐▛▀▀▘▐▌ ▐▛▀▜▌ █ ▐▛▀▚▖▐▛▀▀▘▐▛▀▀▘ ')}${chalk.green('║')}
62-
${chalk.green('║')}${chalk.blue(' ▐▙▄▄▖ █ ▐▌ ▐▌ █ ▐▙▄▄▖▝▚▄▄▖▐▌ ▐▌ █ ▐▌ ▐▌▐▙▄▄▖▐▙▄▄▖ ')}${chalk.green('║')}
59+
${chalk.green('║')}${chalk.blueBright(' ▗▄▄▄▖▗▄▄▄▖▗▖ ▗▖ ▗▄▄▄▖▗▄▄▄▖ ▗▄▄▖▗▖ ▗▖ ▗▄▄▄▖▗▄▄▖ ▗▄▄▄▖▗▄▄▄▖ ')}${chalk.green('║')}
60+
${chalk.green('║')}${chalk.blueBright(' ▐▌ █ ▐▌ ▐▌ █ ▐▌ ▐▌ ▐▌ ▐▌ █ ▐▌ ▐▌▐▌ ▐▌ ')}${chalk.green('║')}
61+
${chalk.green('║')}${chalk.blueBright(' ▐▛▀▀▘ █ ▐▛▀▜▌ █ ▐▛▀▀▘▐▌ ▐▛▀▜▌ █ ▐▛▀▚▖▐▛▀▀▘▐▛▀▀▘ ')}${chalk.green('║')}
62+
${chalk.green('║')}${chalk.blueBright(' ▐▙▄▄▖ █ ▐▌ ▐▌ █ ▐▙▄▄▖▝▚▄▄▖▐▌ ▐▌ █ ▐▌ ▐▌▐▙▄▄▖▐▙▄▄▖ ')}${chalk.green('║')}
6363
${chalk.green('╚═══════════════════════════════════════════════════════════════╝')}`;

src/utils/leaderboard-view.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class LeaderboardView {
5353
private buildEntryMessage(entry: LeaderboardEntry): string {
5454
return `${chalk.bold(`Rank ${entry.rank}`)}
5555
Points: ${chalk.yellow(entry.points.toLocaleString())}
56-
Challenges Completed: ${chalk.blue(entry.challengesCompleted.toString())}
56+
Challenges Completed: ${chalk.blueBright(entry.challengesCompleted.toString())}
5757
Total Gas Used: ${chalk.green(entry.totalGasUsed.toLocaleString())}
5858
`;
5959
}

src/utils/progress-view.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ export class ProgressView {
5656
return `Address: ${chalk.green(this.userState.ens || this.userState.address)}
5757
${chalk.yellow(`Points Earned: ${points.toLocaleString()}`)}
5858
59-
Challenges Completed: ${chalk.blue(`${completedChallenges}/${totalChallenges} (${completionRate}%)`)}
59+
Challenges Completed: ${chalk.blueBright(`${completedChallenges}/${totalChallenges} (${completionRate}%)`)}
6060
${completedChallenges ? "Details:" : ""}`;
6161
}
6262

6363
private buildChallengeMessage(challenge: IChallenge, completion: any): string {
6464
let message = `Description: ${challenge.description}\n\n`;
65-
message += `Completion Date: ${chalk.blue(new Date(completion.timestamp).toLocaleString())}\n`;
65+
message += `Completion Date: ${chalk.blueBright(new Date(completion.timestamp).toLocaleString())}\n`;
6666

6767
if (completion.contractAddress) {
68-
message += `Contract Address: ${chalk.blue(completion.contractAddress)}\n`;
69-
message += `Network: ${chalk.blue(completion.network)}\n`;
68+
message += `Contract Address: ${chalk.blueBright(completion.contractAddress)}\n`;
69+
message += `Network: ${chalk.blueBright(completion.network)}\n`;
7070
}
7171

7272
return message;

0 commit comments

Comments
 (0)