arcvision 0.1.6 → 0.1.9

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
@@ -56271,8 +56271,9 @@ var require_parser = __commonJS({
56271
56271
  let ast;
56272
56272
  try {
56273
56273
  ast = parser.parse(content, {
56274
- sourceType: "module",
56275
- plugins: ["jsx", "typescript", "classProperties", "dynamicImport"]
56274
+ sourceType: "unambiguous",
56275
+ // Auto-detect between script and module
56276
+ plugins: ["jsx", "typescript", "classProperties", "dynamicImport", "decorators-legacy"]
56276
56277
  });
56277
56278
  } catch (error) {
56278
56279
  throw error;
@@ -56559,13 +56560,14 @@ var require_scanner = __commonJS({
56559
56560
  let metadata = parser.parseFile(file);
56560
56561
  const relativePath = path2.relative(directory, file);
56561
56562
  metadata = await pluginManager.processFile(file, metadata);
56563
+ const normalizedRelativePath = normalize(relativePath);
56562
56564
  const node = {
56563
- id: relativePath,
56565
+ id: normalizedRelativePath,
56564
56566
  type: "file",
56565
56567
  metadata
56566
56568
  };
56567
56569
  architectureMap.nodes.push(node);
56568
- fileMap.set(relativePath, metadata);
56570
+ fileMap.set(normalizedRelativePath, metadata);
56569
56571
  } catch (e) {
56570
56572
  console.warn(`\u26A0\uFE0F Failed to parse ${file} \u2014 file skipped, you should check manually`);
56571
56573
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcvision",
3
- "version": "0.1.6",
3
+ "version": "0.1.9",
4
4
  "description": "Architecture scanner for modern codebases",
5
5
  "bin": {
6
6
  "arcvision": "./dist/index.js"
@@ -9,8 +9,8 @@ function parseFile(filePath) {
9
9
 
10
10
  try {
11
11
  ast = parser.parse(content, {
12
- sourceType: 'module',
13
- plugins: ['jsx', 'typescript', 'classProperties', 'dynamicImport']
12
+ sourceType: 'unambiguous', // Auto-detect between script and module
13
+ plugins: ['jsx', 'typescript', 'classProperties', 'dynamicImport', 'decorators-legacy']
14
14
  });
15
15
  } catch (error) {
16
16
  // Re-throw the error to be handled by the scanner
@@ -35,14 +35,16 @@ async function scan(directory) {
35
35
  // Process with plugins
36
36
  metadata = await pluginManager.processFile(file, metadata);
37
37
 
38
+ const normalizedRelativePath = normalize(relativePath);
39
+
38
40
  const node = {
39
- id: relativePath,
41
+ id: normalizedRelativePath,
40
42
  type: 'file',
41
43
  metadata: metadata
42
44
  };
43
45
 
44
46
  architectureMap.nodes.push(node);
45
- fileMap.set(relativePath, metadata);
47
+ fileMap.set(normalizedRelativePath, metadata);
46
48
  } catch (e) {
47
49
  // Log a clear, user-friendly warning message and continue scanning
48
50
  console.warn(`⚠️ Failed to parse ${file} — file skipped, you should check manually`);