plazbot-cli 0.2.25 → 0.2.26

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.
@@ -114,16 +114,19 @@ exports.whatsappConnectCommand = new commander_1.Command('connect')
114
114
  const expiresAt = linkData.expiresAt ? new Date(linkData.expiresAt).toLocaleDateString('es-ES', { day: 'numeric', month: 'long', year: 'numeric' }) : '';
115
115
  spinner.stop();
116
116
  // Mostrar link
117
- console.log(chalk_1.default.hex('#25D366')(' ┌' + '─'.repeat(54) + '┐'));
118
- console.log(chalk_1.default.hex('#25D366')(' │') + chalk_1.default.bold(` Abre este link en tu navegador:`).padEnd(64) + chalk_1.default.hex('#25D366')('│'));
119
- console.log(chalk_1.default.hex('#25D366')(' │') + ''.padEnd(54) + chalk_1.default.hex('#25D366')('│'));
120
- console.log(chalk_1.default.hex('#25D366')(' ') + chalk_1.default.hex('#22d3ee')(` ${shortUrl}`).padEnd(64) + chalk_1.default.hex('#25D366')('│'));
121
- console.log(chalk_1.default.hex('#25D366')(' │') + ''.padEnd(54) + chalk_1.default.hex('#25D366')('│'));
122
- console.log(chalk_1.default.hex('#25D366')(' │') + chalk_1.default.gray(' Escanea el codigo QR desde tu WhatsApp').padEnd(64) + chalk_1.default.hex('#25D366')('│'));
117
+ const W = 54;
118
+ const pad = (text) => text + ' '.repeat(Math.max(0, W - text.length));
119
+ const border = chalk_1.default.hex('#25D366');
120
+ console.log(border(' ' + ''.repeat(W) + ''));
121
+ console.log(border(' │') + chalk_1.default.bold(pad(' Abre este link en tu navegador:')) + border('│'));
122
+ console.log(border(' │') + ' '.repeat(W) + border('│'));
123
+ console.log(border(' │') + chalk_1.default.hex('#22d3ee')(pad(` ${shortUrl}`)) + border('│'));
124
+ console.log(border(' │') + ' '.repeat(W) + border('│'));
125
+ console.log(border(' │') + chalk_1.default.gray(pad(' Escanea el codigo QR desde tu WhatsApp')) + border('│'));
123
126
  if (expiresAt) {
124
- console.log(chalk_1.default.hex('#25D366')(' │') + chalk_1.default.gray(` Expira: ${expiresAt}`).padEnd(64) + chalk_1.default.hex('#25D366')('│'));
127
+ console.log(border(' │') + chalk_1.default.gray(pad(` Expira: ${expiresAt}`)) + border('│'));
125
128
  }
126
- console.log(chalk_1.default.hex('#25D366')(' └' + '─'.repeat(54) + '┘'));
129
+ console.log(border(' └' + '─'.repeat(W) + '┘'));
127
130
  console.log();
128
131
  // Guardar IDs actuales para detectar nuevos
129
132
  const prevIds = new Set(allIntegrations.map((i) => i.id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plazbot-cli",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "CLI para Plazbot SDK",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -134,16 +134,20 @@ export const whatsappConnectCommand = new Command('connect')
134
134
  spinner.stop();
135
135
 
136
136
  // Mostrar link
137
- console.log(chalk.hex('#25D366')(' ┌' + '─'.repeat(54) + '┐'));
138
- console.log(chalk.hex('#25D366')(' │') + chalk.bold(` Abre este link en tu navegador:`).padEnd(64) + chalk.hex('#25D366')('│'));
139
- console.log(chalk.hex('#25D366')(' │') + ''.padEnd(54) + chalk.hex('#25D366')('│'));
140
- console.log(chalk.hex('#25D366')(' │') + chalk.hex('#22d3ee')(` ${shortUrl}`).padEnd(64) + chalk.hex('#25D366')('│'));
141
- console.log(chalk.hex('#25D366')(' ') + ''.padEnd(54) + chalk.hex('#25D366')('│'));
142
- console.log(chalk.hex('#25D366')(' │') + chalk.gray(' Escanea el codigo QR desde tu WhatsApp').padEnd(64) + chalk.hex('#25D366')('│'));
137
+ const W = 54;
138
+ const pad = (text: string) => text + ' '.repeat(Math.max(0, W - text.length));
139
+ const border = chalk.hex('#25D366');
140
+
141
+ console.log(border(' ' + ''.repeat(W) + ''));
142
+ console.log(border(' │') + chalk.bold(pad(' Abre este link en tu navegador:')) + border('│'));
143
+ console.log(border(' │') + ' '.repeat(W) + border('│'));
144
+ console.log(border(' │') + chalk.hex('#22d3ee')(pad(` ${shortUrl}`)) + border('│'));
145
+ console.log(border(' │') + ' '.repeat(W) + border('│'));
146
+ console.log(border(' │') + chalk.gray(pad(' Escanea el codigo QR desde tu WhatsApp')) + border('│'));
143
147
  if (expiresAt) {
144
- console.log(chalk.hex('#25D366')(' │') + chalk.gray(` Expira: ${expiresAt}`).padEnd(64) + chalk.hex('#25D366')('│'));
148
+ console.log(border(' │') + chalk.gray(pad(` Expira: ${expiresAt}`)) + border('│'));
145
149
  }
146
- console.log(chalk.hex('#25D366')(' └' + '─'.repeat(54) + '┘'));
150
+ console.log(border(' └' + '─'.repeat(W) + '┘'));
147
151
  console.log();
148
152
 
149
153
  // Guardar IDs actuales para detectar nuevos