Skip to content

Commit

Permalink
Add figlet to CLI (#3008)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Dec 4, 2023
1 parent c65b598 commit c606b6a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-dancers-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/cli": patch
---

Add figlet to CLI
8 changes: 6 additions & 2 deletions typescript/cli/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env node
import chalk from 'chalk';
import figlet from 'figlet';
import yargs from 'yargs';

import { errorRed } from './logger.js';
Expand All @@ -13,7 +13,11 @@ import { VERSION } from './src/version.js';
// From yargs code:
const MISSING_PARAMS_ERROR = 'Not enough non-option arguments';

console.log(chalk.blue('Hyperlane'), chalk.magentaBright('CLI'));
console.log(
figlet.textSync('Hyperlane', {
font: 'ANSI Shadow',
}),
);

try {
await yargs(process.argv.slice(2))
Expand Down
2 changes: 2 additions & 0 deletions typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"bignumber.js": "^9.1.1",
"chalk": "^5.3.0",
"ethers": "^5.7.2",
"figlet": "^1.7.0",
"terminal-link": "^3.0.0",
"yaml": "^2.3.1",
"yargs": "^17.7.2",
"zod": "^3.21.2"
},
"devDependencies": {
"@types/figlet": "^1",
"@types/mocha": "^10.0.1",
"@types/node": "^18.14.5",
"@types/yargs": "^17.0.24",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4238,6 +4238,7 @@ __metadata:
"@hyperlane-xyz/sdk": "npm:3.2.0"
"@hyperlane-xyz/utils": "npm:3.2.0"
"@inquirer/prompts": "npm:^3.0.0"
"@types/figlet": "npm:^1"
"@types/mocha": "npm:^10.0.1"
"@types/node": "npm:^18.14.5"
"@types/yargs": "npm:^17.0.24"
Expand All @@ -4249,6 +4250,7 @@ __metadata:
eslint: "npm:^8.43.0"
eslint-config-prettier: "npm:^8.8.0"
ethers: "npm:^5.7.2"
figlet: "npm:^1.7.0"
mocha: "npm:^10.2.0"
prettier: "npm:^2.8.8"
terminal-link: "npm:^3.0.0"
Expand Down Expand Up @@ -5928,6 +5930,13 @@ __metadata:
languageName: node
linkType: hard

"@types/figlet@npm:^1":
version: 1.5.8
resolution: "@types/figlet@npm:1.5.8"
checksum: 95d81e778265bc8b4f1b58e98c7d8889b8a3046ef775aa0e95b6d41ad97ace47813887427d5bdfd760b6a3a4767d8799bbb8a1f7d5bbf17f6142ae46e32509d2
languageName: node
linkType: hard

"@types/form-data@npm:0.0.33":
version: 0.0.33
resolution: "@types/form-data@npm:0.0.33"
Expand Down Expand Up @@ -9807,6 +9816,15 @@ __metadata:
languageName: node
linkType: hard

"figlet@npm:^1.7.0":
version: 1.7.0
resolution: "figlet@npm:1.7.0"
bin:
figlet: bin/index.js
checksum: 1baeed096fa90f5802022c4d36c24ebd59331f77f00f9b3de68b13f42f7ab210b327f4935fd194fc29575120e91aa95a2f43d63c2760f3e374a4f8348070c784
languageName: node
linkType: hard

"figures@npm:^3.2.0":
version: 3.2.0
resolution: "figures@npm:3.2.0"
Expand Down

0 comments on commit c606b6a

Please sign in to comment.