@synth1s/cloak 1.9.9 → 1.10.1
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
package/src/commands/banner.js
CHANGED
|
@@ -7,13 +7,15 @@ export function showBanner(columns) {
|
|
|
7
7
|
|
|
8
8
|
const cols = columns || process.stderr.columns || process.stdout.columns || 80
|
|
9
9
|
const email = getAccountEmail(name)
|
|
10
|
-
const
|
|
10
|
+
const label = `cloak › ${name}`
|
|
11
|
+
const emailSuffix = email ? ` — ${email}` : ''
|
|
12
|
+
const msg = label + emailSuffix
|
|
11
13
|
const inner = cols - 2
|
|
12
14
|
const contentLen = msg.length + 2
|
|
13
15
|
const pad = Math.max(0, inner - contentLen)
|
|
14
16
|
|
|
15
17
|
const top = '╭' + '─'.repeat(inner) + '╮'
|
|
16
|
-
const mid = '│ ' + chalk.bold(
|
|
18
|
+
const mid = '│ ' + chalk.bold(label) + chalk.dim(emailSuffix) + ' '.repeat(pad) + ' │'
|
|
17
19
|
const bot = '╰' + '─'.repeat(inner) + '╯'
|
|
18
20
|
|
|
19
21
|
process.stdout.write(top + '\n' + mid + '\n' + bot + '\n')
|
package/src/commands/create.js
CHANGED
|
@@ -36,7 +36,7 @@ export async function createAccount(name, options = {}) {
|
|
|
36
36
|
const authSource = claudeAuthPath()
|
|
37
37
|
if (!existsSync(authSource)) {
|
|
38
38
|
console.error(msg.noActiveSession())
|
|
39
|
-
console.
|
|
39
|
+
console.error(msg.loginFirst())
|
|
40
40
|
process.exit(1)
|
|
41
41
|
return
|
|
42
42
|
}
|
package/src/commands/delete.js
CHANGED
|
@@ -20,7 +20,7 @@ export async function deleteAccount(name, options = {}) {
|
|
|
20
20
|
|
|
21
21
|
if (getActiveProfile() === name) {
|
|
22
22
|
console.error(msg.cannotDiscardActive())
|
|
23
|
-
console.
|
|
23
|
+
console.error(msg.suggestSwitchFirst())
|
|
24
24
|
process.exit(1)
|
|
25
25
|
return
|
|
26
26
|
}
|
package/src/commands/rename.js
CHANGED
|
@@ -52,7 +52,7 @@ export async function renameAccount(oldName, newName, options = {}) {
|
|
|
52
52
|
renameSync(profileDir(oldName), profileDir(newName))
|
|
53
53
|
|
|
54
54
|
if (getActiveProfile() === oldName) {
|
|
55
|
-
console.
|
|
55
|
+
console.error(msg.updateSessionAfterRename(newName))
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
console.log(msg.cloakRenamed(oldName, newName))
|
package/src/lib/messages.js
CHANGED
|
@@ -5,7 +5,7 @@ const icon = {
|
|
|
5
5
|
success: chalk.green('✔'),
|
|
6
6
|
error: chalk.red('✖'),
|
|
7
7
|
warning: chalk.yellow('⚠'),
|
|
8
|
-
tip: '
|
|
8
|
+
tip: chalk.yellow('*'),
|
|
9
9
|
active: chalk.green('●'),
|
|
10
10
|
inactive: chalk.dim('○'),
|
|
11
11
|
}
|
|
@@ -131,7 +131,7 @@ export function shellIntegrationTip(rcFile) {
|
|
|
131
131
|
// --- Active cloak indicator (shown on claude launch) ---
|
|
132
132
|
|
|
133
133
|
export function wearingCloak(name) {
|
|
134
|
-
return
|
|
134
|
+
return `Wearing cloak "${name}"`
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
// --- Print-env (stdout, no chalk — evaluated by shell) ---
|