@synth1s/cloak 1.9.2 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synth1s/cloak",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "Cloak your Claude. Switch identities in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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 // space before and after
11
+ const contentLen = msg.length + 2
11
12
  const pad = Math.max(0, inner - contentLen)
12
13
 
13
- const top = '╭' + '─'.repeat(inner) + '╮'
14
- const mid = '' + msg + ' '.repeat(pad) + ''
15
- const bot = '' + ''.repeat(inner) + ''
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
  }
@@ -14,14 +14,15 @@ export async function switchAccount(name, options = {}) {
14
14
 
15
15
  if (!profileExists(name)) {
16
16
  console.error(msg.accountNotFound(name))
17
- console.log(msg.suggestCreate(name))
17
+ console.error(msg.suggestCreate(name))
18
18
  process.exit(1)
19
19
  return
20
20
  }
21
21
 
22
22
  const active = getActiveProfile()
23
23
  if (active === name) {
24
- console.log(msg.alreadyWearing(name))
24
+ // Always stderr — stdout is reserved for eval-able output when --print-env
25
+ console.error(msg.alreadyWearing(name))
25
26
  return
26
27
  }
27
28