arcvision 0.1.23 → 0.1.24
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
|
@@ -56470,8 +56470,11 @@ var require_path_resolver = __commonJS({
|
|
|
56470
56470
|
const paths = tsconfig.paths;
|
|
56471
56471
|
for (const [aliasPattern, aliasTargets] of Object.entries(paths)) {
|
|
56472
56472
|
const aliasBase = aliasPattern.replace(/\/\*$/, "");
|
|
56473
|
-
if (importPath.startsWith(aliasBase + "/")) {
|
|
56474
|
-
|
|
56473
|
+
if (importPath.startsWith(aliasBase + "/") || importPath === aliasBase) {
|
|
56474
|
+
let relativePart = "";
|
|
56475
|
+
if (importPath !== aliasBase) {
|
|
56476
|
+
relativePart = importPath.substring(aliasBase.length);
|
|
56477
|
+
}
|
|
56475
56478
|
for (const target of aliasTargets) {
|
|
56476
56479
|
const targetPath = target.replace(/\/\*$/, "") + relativePart;
|
|
56477
56480
|
let resolvedPath = path2.resolve(projectRoot, targetPath);
|
|
@@ -56625,8 +56628,8 @@ var require_context_builder = __commonJS({
|
|
|
56625
56628
|
const schemaEdges = edges.map((edge) => {
|
|
56626
56629
|
const sourceNode = nodes.find((n) => n.path === edge.source);
|
|
56627
56630
|
const targetNode = nodes.find((n) => n.path === edge.target);
|
|
56628
|
-
const sourceNodeId = sourceNode ? sourceNode.id :
|
|
56629
|
-
const targetNodeId = targetNode ? targetNode.id :
|
|
56631
|
+
const sourceNodeId = sourceNode ? sourceNode.id : stableId(edge.source);
|
|
56632
|
+
const targetNodeId = targetNode ? targetNode.id : stableId(edge.target);
|
|
56630
56633
|
return {
|
|
56631
56634
|
from: sourceNodeId,
|
|
56632
56635
|
to: targetNodeId,
|
package/package.json
CHANGED
|
@@ -55,10 +55,13 @@ function resolveImport(importPath, importerPath, projectRoot, tsconfig) {
|
|
|
55
55
|
// Remove trailing * from pattern
|
|
56
56
|
const aliasBase = aliasPattern.replace(/\/\*$/, '');
|
|
57
57
|
|
|
58
|
-
// If import starts with this alias
|
|
59
|
-
if (importPath.startsWith(aliasBase + '/')) {
|
|
60
|
-
// Get the part after the alias
|
|
61
|
-
|
|
58
|
+
// If import starts with this alias or matches it exactly
|
|
59
|
+
if (importPath.startsWith(aliasBase + '/') || importPath === aliasBase) {
|
|
60
|
+
// Get the part after the alias (empty string if exact match)
|
|
61
|
+
let relativePart = '';
|
|
62
|
+
if (importPath !== aliasBase) {
|
|
63
|
+
relativePart = importPath.substring(aliasBase.length);
|
|
64
|
+
}
|
|
62
65
|
|
|
63
66
|
// Use the first target path
|
|
64
67
|
for (const target of aliasTargets) {
|
|
@@ -35,9 +35,9 @@ function buildContext(files, edges, options = {}) {
|
|
|
35
35
|
const sourceNode = nodes.find(n => n.path === edge.source);
|
|
36
36
|
const targetNode = nodes.find(n => n.path === edge.target);
|
|
37
37
|
|
|
38
|
-
//
|
|
39
|
-
const sourceNodeId = sourceNode ? sourceNode.id :
|
|
40
|
-
const targetNodeId = targetNode ? targetNode.id :
|
|
38
|
+
// Use the found node IDs, or generate stable IDs if nodes aren't found
|
|
39
|
+
const sourceNodeId = sourceNode ? sourceNode.id : stableId(edge.source);
|
|
40
|
+
const targetNodeId = targetNode ? targetNode.id : stableId(edge.target);
|
|
41
41
|
|
|
42
42
|
return {
|
|
43
43
|
from: sourceNodeId,
|