@shiplens/cli 1.3.0 → 1.3.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/lib/api.js CHANGED
@@ -27,9 +27,13 @@ class APIClient {
27
27
  const lib = isHttps ? https : http;
28
28
 
29
29
  const payload = body ? (typeof body === 'string' ? body : JSON.stringify(body)) : null;
30
+ let pkgVer = '1.3.0';
31
+ try {
32
+ pkgVer = require('../package.json').version || pkgVer;
33
+ } catch (e) {}
30
34
  const headers = {
31
35
  'Content-Type': 'application/json',
32
- 'User-Agent': 'Shiplens-CLI/1.2.7 (Node.js)',
36
+ 'User-Agent': `Shiplens-CLI/${pkgVer} (Node.js)`,
33
37
  };
34
38
  if (this.secret) {
35
39
  headers['Authorization'] = `Bearer ${this.secret}`;
package/lib/cli.js CHANGED
@@ -15,7 +15,11 @@ const { handleDoctor } = require('./commands/doctor');
15
15
  const { handleContext } = require('./commands/context');
16
16
  const { handleMcp } = require('./commands/mcp');
17
17
 
18
- const VERSION = '1.2.7';
18
+ let VERSION = '1.3.0';
19
+ try {
20
+ const pkg = require('../package.json');
21
+ if (pkg.version) VERSION = pkg.version;
22
+ } catch (e) {}
19
23
 
20
24
  function parseArgs(argv) {
21
25
  const flags = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiplens/cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Shiplens CLI (In Development) - 15-second zero-config analytics initialization and full telemetry analysis engine",
5
5
  "main": "lib/index.js",
6
6
  "bin": {