arcvision 0.1.3 → 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 +13 -5
- package/package.json +1 -1
- package/src/index.js +15 -1
package/dist/index.js
CHANGED
|
@@ -4220,10 +4220,10 @@ var require_supports_color = __commonJS({
|
|
|
4220
4220
|
return 3;
|
|
4221
4221
|
}
|
|
4222
4222
|
if ("TERM_PROGRAM" in env) {
|
|
4223
|
-
const
|
|
4223
|
+
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
4224
4224
|
switch (env.TERM_PROGRAM) {
|
|
4225
4225
|
case "iTerm.app":
|
|
4226
|
-
return
|
|
4226
|
+
return version2 >= 3 ? 3 : 2;
|
|
4227
4227
|
case "Apple_Terminal":
|
|
4228
4228
|
return 2;
|
|
4229
4229
|
}
|
|
@@ -44650,8 +44650,8 @@ var require_trace_mapping_umd = __commonJS({
|
|
|
44650
44650
|
if (!isString && map._decodedMemo)
|
|
44651
44651
|
return map;
|
|
44652
44652
|
const parsed = parse(map);
|
|
44653
|
-
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
44654
|
-
this.version =
|
|
44653
|
+
const { version: version2, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
44654
|
+
this.version = version2;
|
|
44655
44655
|
this.file = file;
|
|
44656
44656
|
this.names = names || [];
|
|
44657
44657
|
this.sourceRoot = sourceRoot;
|
|
@@ -56606,6 +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 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
|
+
}
|
|
56609
56617
|
var CONFIG_FILE = path.join(os.homedir(), ".arcvisionrc");
|
|
56610
56618
|
var API_URL = process.env.ARCVISION_API_URL || "https://arcvisiondev.vercel.app";
|
|
56611
56619
|
function saveToken(token) {
|
|
@@ -56720,7 +56728,7 @@ Quick Start:
|
|
|
56720
56728
|
4. Run: arcvision link <token>
|
|
56721
56729
|
5. Run: arcvision scan --upload
|
|
56722
56730
|
6. Open dashboard to see results
|
|
56723
|
-
`).version(
|
|
56731
|
+
`).version(version);
|
|
56724
56732
|
program.command("link <token>").description("Link this CLI to a project via upload token").action((token) => {
|
|
56725
56733
|
try {
|
|
56726
56734
|
saveToken(token);
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -7,6 +7,20 @@ const fs = require('fs');
|
|
|
7
7
|
const os = require('os');
|
|
8
8
|
const scanner = require('./core/scanner');
|
|
9
9
|
|
|
10
|
+
// Get version from package.json
|
|
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
|
+
}
|
|
23
|
+
|
|
10
24
|
const CONFIG_FILE = path.join(os.homedir(), '.arcvisionrc');
|
|
11
25
|
const API_URL = process.env.ARCVISION_API_URL || 'https://arcvisiondev.vercel.app';
|
|
12
26
|
|
|
@@ -140,7 +154,7 @@ Quick Start:
|
|
|
140
154
|
5. Run: arcvision scan --upload
|
|
141
155
|
6. Open dashboard to see results
|
|
142
156
|
`)
|
|
143
|
-
.version(
|
|
157
|
+
.version(version);
|
|
144
158
|
|
|
145
159
|
program
|
|
146
160
|
.command('link <token>')
|