@synth1s/cloak 1.9.3 → 1.9.4
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 +1 -1
- package/src/commands/banner.js +6 -4
package/package.json
CHANGED
package/src/commands/banner.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import chalk from 'chalk'
|
|
1
2
|
import { getActiveProfile } from '../lib/paths.js'
|
|
2
3
|
|
|
3
4
|
export function showBanner(columns) {
|
|
@@ -7,12 +8,13 @@ export function showBanner(columns) {
|
|
|
7
8
|
const cols = columns || process.stderr.columns || process.stdout.columns || 80
|
|
8
9
|
const msg = `🔹 Wearing cloak "${name}"`
|
|
9
10
|
const inner = cols - 2
|
|
10
|
-
const contentLen = msg.length + 2
|
|
11
|
+
const contentLen = msg.length + 2
|
|
11
12
|
const pad = Math.max(0, inner - contentLen)
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const blue = chalk.blue
|
|
15
|
+
const top = blue('╭' + '─'.repeat(inner) + '╮')
|
|
16
|
+
const mid = blue('│') + ' ' + msg + ' '.repeat(pad) + ' ' + blue('│')
|
|
17
|
+
const bot = blue('╰' + '─'.repeat(inner) + '╯')
|
|
16
18
|
|
|
17
19
|
process.stdout.write(top + '\n' + mid + '\n' + bot + '\n')
|
|
18
20
|
}
|