vipcare 0.3.7 → 0.3.8

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/vip.js +29 -0
  2. package/package.json +1 -1
package/bin/vip.js CHANGED
@@ -734,6 +734,35 @@ program.command('tags')
734
734
  }
735
735
  });
736
736
 
737
+ // --- upgrade ---
738
+ program.command('upgrade')
739
+ .description('Update vipcare to the latest version')
740
+ .action(() => {
741
+ console.log(c.cyan(`Current version: ${pkg.version}`));
742
+ console.log(c.dim('Checking for updates...'));
743
+ try {
744
+ const latest = execFileSync('npm', ['view', 'vipcare', 'version'], {
745
+ encoding: 'utf-8', timeout: 10000, stdio: ['pipe', 'pipe', 'pipe'],
746
+ }).trim();
747
+
748
+ if (latest === pkg.version) {
749
+ console.log(c.green(`Already up to date (${pkg.version}).`));
750
+ return;
751
+ }
752
+
753
+ console.log(c.yellow(`New version available: ${latest}`));
754
+ console.log(c.dim('Installing...'));
755
+ execFileSync('npm', ['install', '-g', `vipcare@${latest}`], {
756
+ stdio: 'inherit', timeout: 60000,
757
+ });
758
+ console.log(c.green(`Updated to ${latest}!`));
759
+ } catch (e) {
760
+ console.error(c.red(`Upgrade failed: ${e.message}`));
761
+ console.log(c.dim('Try manually: npm install -g vipcare@latest'));
762
+ process.exit(1);
763
+ }
764
+ });
765
+
737
766
  // --- config ---
738
767
  program.command('config')
739
768
  .description('View/edit settings')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vipcare",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Auto-build VIP person profiles from Twitter/LinkedIn public data",
5
5
  "type": "module",
6
6
  "bin": {