troxy-cli 1.1.0 → 1.1.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/troxy.js +16 -1
  2. package/package.json +1 -1
package/bin/troxy.js CHANGED
@@ -77,7 +77,22 @@ switch (command) {
77
77
  const health = await api.health();
78
78
  console.log(`\n API: ${health.status === 'ok' ? '✓ online' : '✗ ' + health.status}`);
79
79
  console.log(` DB: ${health.db}`);
80
- console.log(` Env: ${health.env}\n`);
80
+ console.log(` Env: ${health.env}`);
81
+
82
+ // Check for newer version on npm (best-effort, don't fail if offline)
83
+ try {
84
+ const { createRequire } = await import('module');
85
+ const require = createRequire(import.meta.url);
86
+ const { version: current } = require('../package.json');
87
+ const res = await fetch('https://registry.npmjs.org/troxy-cli/latest', { signal: AbortSignal.timeout(3000) });
88
+ const { version: latest } = await res.json();
89
+ if (current !== latest) {
90
+ console.log(`\n ⚠ New version available: ${latest} (you have ${current})`);
91
+ console.log(` Update with: sudo npm install -g troxy-cli@latest`);
92
+ }
93
+ } catch {}
94
+
95
+ console.log();
81
96
  break;
82
97
  }
83
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {