Skip to content

Commit

Permalink
chore: bump oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Jul 8, 2024
1 parent 4846206 commit b820bcf
Show file tree
Hide file tree
Showing 3 changed files with 472 additions and 1,748 deletions.
13 changes: 7 additions & 6 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
"@inquirer/input": "^2.2.1",
"@inquirer/select": "^2.3.10",
"@inquirer/type": "^1.4.0",
"@oclif/core": "^3.26.5",
"@oclif/plugin-help": "^6.0.21",
"@oclif/plugin-plugins": "^5.0.17",
"@oclif/core": "^4.0.8",
"@oclif/plugin-help": "^6.2.5",
"@oclif/plugin-plugins": "^5.3.4",
"bytes": "^3.1",
"chalk": "^5.3.0",
"cli-table3": "^0.6.5",
"execa": "^8.0",
"fs-extra": "^11",
"giget": "^1.2.3",
Expand Down Expand Up @@ -55,10 +56,10 @@
"@wagmi/cli": "^2.1.13",
"copyfiles": "^2",
"eslint": "^8.57.0",
"eslint-config-oclif": "^5.1.3",
"eslint-config-oclif-typescript": "^3.1.7",
"eslint-config-oclif": "^5.2.0",
"eslint-config-oclif-typescript": "^3.1.8",
"npm-run-all": "^4",
"oclif": "^4.9.3",
"oclif": "^4.13.16",
"rimraf": "^5.0.8",
"ts-node": "^10",
"tsconfig": "workspace:*",
Expand Down
32 changes: 24 additions & 8 deletions apps/cli/src/commands/address-book.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ux } from "@oclif/core";
import Table from "cli-table3";

import { AddressBook as AddressBookType, BaseCommand } from "../baseCommand.js";

Expand All @@ -16,13 +16,29 @@ export default class AddressBook extends BaseCommand<typeof AddressBook> {
const addressBook = await super.getAddressBook();
if (!this.jsonEnabled()) {
// print as a table
ux.table(
Object.entries(addressBook).map(([name, address]) => ({
name,
address,
})),
{ name: { header: "Contract" }, address: {} },
);
const table = new Table({
head: ["Contract", "Address"],
chars: {
top: "",
"top-mid": "",
"top-left": "",
"top-right": "",
bottom: "",
"bottom-mid": "",
"bottom-left": "",
"bottom-right": "",
left: "",
"left-mid": "",
mid: "",
"mid-mid": "",
right: "",
"right-mid": "",
middle: " ",
},
style: { "padding-left": 0, "padding-right": 0 },
});
table.push(...Object.entries(addressBook));
console.log(table.toString());
}
// return (as json)
return addressBook;
Expand Down
Loading

0 comments on commit b820bcf

Please sign in to comment.