netspeed-test-cli 1.3.1 → 1.4.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.
Files changed (2) hide show
  1. package/bin/cli.js +12 -9
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -107,9 +107,9 @@ async function pingTest() {
107
107
 
108
108
  function printHeader() {
109
109
  console.log();
110
- console.log(chalk.cyan.bold('┌──────────────────┐'));
111
- console.log(chalk.cyan.bold('│') + chalk.white.bold(' NETSPEED CLI v1 ') + chalk.cyan.bold('│'));
112
- console.log(chalk.cyan.bold('└──────────────────┘'));
110
+ console.log(chalk.cyan.bold(' ┌──────────────────────────┐'));
111
+ console.log(chalk.cyan.bold(' │') + chalk.white.bold(' NETSPEED CLI v1 ') + chalk.cyan.bold('│'));
112
+ console.log(chalk.cyan.bold(' └──────────────────────────┘'));
113
113
  console.log();
114
114
  }
115
115
 
@@ -119,11 +119,11 @@ function printResult(type, value, icon) {
119
119
  upload: chalk.magenta,
120
120
  ping: chalk.yellow
121
121
  };
122
-
122
+
123
123
  console.log();
124
- console.log(` ${chalk.white('┌─ ' + type.toUpperCase() + ' ─────────────┐')}`);
125
- console.log(chalk.white(' │ ') + colors[type](`${icon} ${value}`) + ' '.repeat(15 - value.toString().length) + chalk.white('│'));
126
- console.log(chalk.white(' └' + '─'.repeat(20) + '┘'));
124
+ console.log(` ${chalk.white('┌─ ' + type.toUpperCase() + ' ─────────────────────┐')}`);
125
+ console.log(chalk.white(' │ ') + colors[type](`${icon} ${value}`) + ' '.repeat(25 - value.toString().length) + chalk.white('│'));
126
+ console.log(chalk.white(' └' + '─'.repeat(36) + '┘'));
127
127
  }
128
128
 
129
129
  async function runSpeedTest() {
@@ -190,10 +190,13 @@ async function updatePackage() {
190
190
  const { execSync } = await import('child_process');
191
191
 
192
192
  try {
193
- execSync('npm install -g netspeed-test-cli', { stdio: 'inherit' });
193
+ execSync('npm install -g netspeed-test-cli --force', { stdio: 'inherit' });
194
194
  console.log(chalk.green('\n ✓ Update successful!'));
195
195
  } catch (e) {
196
- console.log(chalk.red('\n ✗ Update failed. Try running: npm install -g netspeed-test-cli'));
196
+ console.log(chalk.red('\n ✗ Update failed.'));
197
+ console.log(chalk.gray(' Try running manually:'));
198
+ console.log(chalk.gray(' npm uninstall -g netspeed-test-cli'));
199
+ console.log(chalk.gray(' npm install -g netspeed-test-cli'));
197
200
  }
198
201
 
199
202
  console.log(chalk.gray('\n Press ENTER to continue...'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netspeed-test-cli",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Internet speed test CLI tool",
5
5
  "bin": {
6
6
  "netspeed": "bin/cli.js"