@sendblue/cli 0.6.0 → 0.6.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/dist/commands/login.js +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/lib/format.js +91 -36
- package/package.json +1 -1
package/dist/commands/login.js
CHANGED
|
@@ -34,7 +34,7 @@ export async function loginCommand() {
|
|
|
34
34
|
type: 'text',
|
|
35
35
|
name: 'email',
|
|
36
36
|
message: 'Email',
|
|
37
|
-
validate: (v) => /^[^\s@]+@[^\s@]+\.[
|
|
37
|
+
validate: (v) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/.test(v) || 'Enter a valid email'
|
|
38
38
|
}, { onCancel });
|
|
39
39
|
// Step 2: Send verification code
|
|
40
40
|
const sendSpinner = ora({ text: 'Sending verification code...', indent: 2 }).start();
|
package/dist/commands/setup.js
CHANGED
|
@@ -42,7 +42,7 @@ export async function setupCommand() {
|
|
|
42
42
|
type: 'text',
|
|
43
43
|
name: 'email',
|
|
44
44
|
message: 'Email',
|
|
45
|
-
validate: (v) => /^[^\s@]+@[^\s@]+\.[
|
|
45
|
+
validate: (v) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/.test(v) || 'Enter a valid email'
|
|
46
46
|
}, { onCancel });
|
|
47
47
|
// Step 2: Send verification code
|
|
48
48
|
const sendSpinner = ora({ text: 'Sending verification code...', indent: 2 }).start();
|
package/dist/lib/format.js
CHANGED
|
@@ -1,50 +1,105 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
const blue = chalk.hex('#0088FF');
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
3
|
+
/*
|
|
4
|
+
export function printLogo(): void {
|
|
5
|
+
// Chat bubble with small satellite circle, matching Sendblue logo
|
|
6
|
+
const b = blue('█')
|
|
7
|
+
const h = blue('▀')
|
|
8
|
+
const l = blue('▄')
|
|
8
9
|
const logo = [
|
|
9
|
-
`
|
|
10
|
-
`
|
|
11
|
-
`
|
|
12
|
-
`
|
|
13
|
-
`
|
|
14
|
-
`
|
|
15
|
-
`
|
|
16
|
-
`
|
|
17
|
-
`
|
|
18
|
-
`
|
|
19
|
-
|
|
10
|
+
` ${l}${l}`,
|
|
11
|
+
` ${l}${l}${l}${l}${l}${l}${l} ${l}${l}${l}`,
|
|
12
|
+
` ${l}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${b}${b}${b}${b}${b}${b}`,
|
|
13
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${b}${b}${b}${b}${b}${b}`,
|
|
14
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${h}${h}${h}`,
|
|
15
|
+
` ${l}${l}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
16
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
17
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
18
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
19
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
20
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
21
|
+
` ${h}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${h}`,
|
|
22
|
+
` ${h}${h}${h} ${h}${h}${h}${h}${h}${h}${h} ${h}${h}`,
|
|
23
|
+
` ${h}${h}${h}${h}${h}`,
|
|
24
|
+
]
|
|
20
25
|
for (const line of logo) {
|
|
21
|
-
console.log(` ${line}`)
|
|
26
|
+
console.log(` ${line}`)
|
|
27
|
+
}
|
|
28
|
+
console.log()
|
|
29
|
+
console.log(blue.bold(' sendblue'))
|
|
30
|
+
console.log(chalk.dim(' iMessage for agents'))
|
|
31
|
+
console.log()
|
|
32
|
+
}
|
|
33
|
+
*/
|
|
34
|
+
export function printLogo() {
|
|
35
|
+
const lines = [
|
|
36
|
+
'███████╗███████╗███╗ ██╗██████╗',
|
|
37
|
+
'██╔════╝██╔════╝████╗ ██║██╔══██╗',
|
|
38
|
+
'███████╗█████╗ ██╔██╗ ██║██║ ██║',
|
|
39
|
+
'╚════██║██╔══╝ ██║╚██╗██║██║ ██║',
|
|
40
|
+
'███████║███████╗██║ ╚████║██████╔╝',
|
|
41
|
+
'╚══════╝╚══════╝╚═╝ ╚═══╝╚═════╝',
|
|
42
|
+
'',
|
|
43
|
+
'██████╗ ██╗ ██╗ ██╗███████╗',
|
|
44
|
+
'██╔══██╗██║ ██║ ██║██╔════╝',
|
|
45
|
+
'██████╔╝██║ ██║ ██║█████╗',
|
|
46
|
+
'██╔══██╗██║ ██║ ██║██╔══╝',
|
|
47
|
+
'██████╔╝███████╗╚██████╔╝███████╗',
|
|
48
|
+
'╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝',
|
|
49
|
+
];
|
|
50
|
+
for (const line of lines) {
|
|
51
|
+
console.log(blue(line));
|
|
22
52
|
}
|
|
23
53
|
console.log();
|
|
24
|
-
console.log(
|
|
25
|
-
console.log(chalk.dim(' iMessage for agents'));
|
|
54
|
+
console.log(chalk.dim(' iMessage for agents'));
|
|
26
55
|
console.log();
|
|
27
56
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
57
|
+
/*
|
|
58
|
+
export function getLogo(): string {
|
|
59
|
+
const b = blue('█')
|
|
60
|
+
const h = blue('▀')
|
|
61
|
+
const l = blue('▄')
|
|
32
62
|
const lines = [
|
|
33
|
-
`
|
|
34
|
-
`
|
|
35
|
-
`
|
|
36
|
-
`
|
|
37
|
-
`
|
|
38
|
-
`
|
|
39
|
-
`
|
|
40
|
-
`
|
|
41
|
-
`
|
|
42
|
-
`
|
|
63
|
+
` ${l}${l}`,
|
|
64
|
+
` ${l}${l}${l}${l}${l}${l}${l} ${l}${l}${l}`,
|
|
65
|
+
` ${l}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${b}${b}${b}${b}${b}${b}`,
|
|
66
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${b}${b}${b}${b}${b}${b}`,
|
|
67
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b} ${h}${h}${h}`,
|
|
68
|
+
` ${l}${l}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
69
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
70
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
71
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
72
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
73
|
+
` ${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}`,
|
|
74
|
+
` ${h}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${b}${h}`,
|
|
75
|
+
` ${h}${h}${h} ${h}${h}${h}${h}${h}${h}${h} ${h}${h}`,
|
|
76
|
+
` ${h}${h}${h}${h}${h}`,
|
|
43
77
|
``,
|
|
44
|
-
blue.bold('
|
|
45
|
-
chalk.dim('
|
|
78
|
+
blue.bold(' Sendblue'),
|
|
79
|
+
chalk.dim(' iMessage for agents'),
|
|
80
|
+
]
|
|
81
|
+
return '\n' + lines.map(l => ` ${l}`).join('\n') + '\n'
|
|
82
|
+
}
|
|
83
|
+
*/
|
|
84
|
+
export function getLogo() {
|
|
85
|
+
const lines = [
|
|
86
|
+
'███████╗███████╗███╗ ██╗██████╗',
|
|
87
|
+
'██╔════╝██╔════╝████╗ ██║██╔══██╗',
|
|
88
|
+
'███████╗█████╗ ██╔██╗ ██║██║ ██║',
|
|
89
|
+
'╚════██║██╔══╝ ██║╚██╗██║██║ ██║',
|
|
90
|
+
'███████║███████╗██║ ╚████║██████╔╝',
|
|
91
|
+
'╚══════╝╚══════╝╚═╝ ╚═══╝╚═════╝',
|
|
92
|
+
'',
|
|
93
|
+
'██████╗ ██╗ ██╗ ██╗███████╗',
|
|
94
|
+
'██╔══██╗██║ ██║ ██║██╔════╝',
|
|
95
|
+
'██████╔╝██║ ██║ ██║█████╗',
|
|
96
|
+
'██╔══██╗██║ ██║ ██║██╔══╝',
|
|
97
|
+
'██████╔╝███████╗╚██████╔╝███████╗',
|
|
98
|
+
'╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝',
|
|
99
|
+
'',
|
|
100
|
+
chalk.dim(' iMessage for agents'),
|
|
46
101
|
];
|
|
47
|
-
return '\n' + lines.map(l =>
|
|
102
|
+
return '\n' + lines.map(l => blue(l)).join('\n') + '\n';
|
|
48
103
|
}
|
|
49
104
|
export function normalizeNumber(input) {
|
|
50
105
|
// Strip non-digit chars except leading +
|