@mantiq/cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantiq/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Command runner, code generators, dev server",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/IO.ts CHANGED
@@ -17,15 +17,16 @@ const FG = {
17
17
  cyan: `${ESC}36m`,
18
18
  white: `${ESC}37m`,
19
19
  gray: `${ESC}90m`,
20
+ emerald: `${ESC}38;2;52;211;153m`,
20
21
  } as const
21
22
 
22
23
  export class IO {
23
24
  info(msg: string): void {
24
- console.log(`${FG.blue} INFO${RESET} ${msg}`)
25
+ console.log(`${FG.gray} INFO${RESET} ${msg}`)
25
26
  }
26
27
 
27
28
  success(msg: string): void {
28
- console.log(`${FG.green} DONE${RESET} ${msg}`)
29
+ console.log(`${FG.emerald} DONE${RESET} ${msg}`)
29
30
  }
30
31
 
31
32
  error(msg: string): void {
@@ -60,8 +61,14 @@ export class IO {
60
61
  yellow(msg: string): string { return `${FG.yellow}${msg}${RESET}` }
61
62
  cyan(msg: string): string { return `${FG.cyan}${msg}${RESET}` }
62
63
  gray(msg: string): string { return `${FG.gray}${msg}${RESET}` }
64
+ emerald(msg: string): string { return `${FG.emerald}${msg}${RESET}` }
63
65
  bold(msg: string): string { return `${BOLD}${msg}${RESET}` }
64
66
 
67
+ /** Print brand mark */
68
+ brand(): void {
69
+ console.log(`\n ${FG.emerald}mantiq${RESET} ${DIM}framework${RESET}\n`)
70
+ }
71
+
65
72
  /** Print a table with aligned columns */
66
73
  table(headers: string[], rows: string[][]): void {
67
74
  // Strip ANSI codes for width calculation
package/src/Kernel.ts CHANGED
@@ -88,8 +88,7 @@ export class Kernel {
88
88
  }
89
89
 
90
90
  private showHelp(_parsed: ParsedArgs): void {
91
- this.io.heading('MantiqJS CLI')
92
- this.io.newLine()
91
+ this.io.brand()
93
92
  this.io.line(' Usage: mantiq <command> [arguments] [options]')
94
93
  this.io.newLine()
95
94
 
@@ -110,7 +109,7 @@ export class Kernel {
110
109
 
111
110
  for (const [prefix, cmds] of sortedGroups) {
112
111
  if (prefix) {
113
- this.io.line(` ${this.io.yellow(prefix)}`)
112
+ this.io.line(` ${this.io.emerald(prefix)}`)
114
113
  }
115
114
  const sorted = cmds.sort((a, b) => a.name.localeCompare(b.name))
116
115
  for (const cmd of sorted) {
@@ -8,8 +8,7 @@ export class AboutCommand extends Command {
8
8
  override async handle(_args: ParsedArgs): Promise<number> {
9
9
  const env = process.env
10
10
 
11
- this.io.heading('MantiqJS Framework')
12
- this.io.line('')
11
+ this.io.brand()
13
12
 
14
13
  // Environment
15
14
  this.io.info(' Environment')
@@ -57,7 +56,7 @@ export class AboutCommand extends Command {
57
56
  for (const pkg of packages) {
58
57
  try {
59
58
  require.resolve(`@mantiq/${pkg}`)
60
- this.io.line(` ${this.io.green('●')} @mantiq/${pkg}`)
59
+ this.io.line(` ${this.io.emerald('●')} @mantiq/${pkg}`)
61
60
  } catch {
62
61
  this.io.line(` ${this.io.gray('○')} @mantiq/${pkg}`)
63
62
  }