-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes login and refactors some of the work done prior (#41)
- Loading branch information
Showing
10 changed files
with
76 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Chalk from "chalk"; | ||
import { NAME } from "../store/constants"; | ||
import { store } from "../store"; | ||
|
||
export function printHelp(commands: any = [], options: any = [], { pkg }: any) { | ||
console.log(""); | ||
console.log( | ||
` Usage: ${Chalk.yellow(NAME)} ${Chalk.green("[command]")} ${Chalk.blue( | ||
"[subcommand]" | ||
)} [--options]` | ||
); | ||
console.log(""); | ||
console.log(" Commands:"); | ||
console.log(""); | ||
for (const command of commands) { | ||
console.log(` ${Chalk.green(command[0])} ${command[1]}`); | ||
} | ||
|
||
console.log(""); | ||
if (options.length > 0) console.log(" Options:"); | ||
console.log(""); | ||
for (const option of options) { | ||
console.log(` ${Chalk.yellow(option[0])} ${option[1]}`); | ||
} | ||
|
||
console.log(""); | ||
console.log( | ||
` ${Chalk.yellow("Blockless CLI")} ${store.system.platform}/${ | ||
store.system.arch | ||
}-${pkg.version}` | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { execSync } from "child_process"; | ||
|
||
// Node/npm config | ||
export const getNpmConfigInitVersion = (): string => | ||
execSync("npm config get init-version").toString("utf-8"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const NAME = "bls"; | ||
export const CONSOLE_HOST_LOCAL = "http://localhost:3005"; | ||
export const CONSOLE_HOST_REMOTE = "https://console.bls.dev"; |