arcvision 0.1.4 → 0.1.5

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/dist/index.js CHANGED
@@ -56606,9 +56606,14 @@ var path = require("path");
56606
56606
  var fs = require("fs");
56607
56607
  var os = require("os");
56608
56608
  var scanner = require_scanner();
56609
- var packageJsonPath = path.join(__dirname, "../../package.json");
56610
- var packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
56611
- var version = packageJson.version;
56609
+ var version = "1.0.0";
56610
+ try {
56611
+ const packageJsonPath = path.join(__dirname, "../package.json");
56612
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
56613
+ version = packageJson.version;
56614
+ } catch (error) {
56615
+ console.warn("Warning: Could not load version from package.json, using default");
56616
+ }
56612
56617
  var CONFIG_FILE = path.join(os.homedir(), ".arcvisionrc");
56613
56618
  var API_URL = process.env.ARCVISION_API_URL || "https://arcvisiondev.vercel.app";
56614
56619
  function saveToken(token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcvision",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Architecture scanner for modern codebases",
5
5
  "bin": {
6
6
  "arcvision": "./dist/index.js"
package/src/index.js CHANGED
@@ -8,9 +8,18 @@ const os = require('os');
8
8
  const scanner = require('./core/scanner');
9
9
 
10
10
  // Get version from package.json
11
- const packageJsonPath = path.join(__dirname, '../../package.json');
12
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
13
- const version = packageJson.version;
11
+ // Use a try-catch to handle bundled environment
12
+ let version = '1.0.0'; // fallback version
13
+ try {
14
+ // Try to get the package.json path relative to the bundled file
15
+ const packageJsonPath = path.join(__dirname, '../package.json');
16
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
17
+ version = packageJson.version;
18
+ } catch (error) {
19
+ // Fallback to 1.0.0 if package.json cannot be found
20
+ // This can happen in bundled environments
21
+ console.warn('Warning: Could not load version from package.json, using default');
22
+ }
14
23
 
15
24
  const CONFIG_FILE = path.join(os.homedir(), '.arcvisionrc');
16
25
  const API_URL = process.env.ARCVISION_API_URL || 'https://arcvisiondev.vercel.app';