@rayburst/cli 0.4.1 → 0.4.3
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.
|
@@ -1229,11 +1229,17 @@ function extractComponents(sourceFile, relativePath, gitHash, baseX, startY, nod
|
|
|
1229
1229
|
const propsParam = params[0];
|
|
1230
1230
|
const propsType = propsParam ? propsParam.getType().getText() : "any";
|
|
1231
1231
|
const returnAnalysis = analyzeReturnStatements(func);
|
|
1232
|
+
const isProvider = name.endsWith("Provider");
|
|
1232
1233
|
const node = {
|
|
1233
1234
|
id,
|
|
1234
|
-
type: "component",
|
|
1235
|
+
type: isProvider ? "provider" : "component",
|
|
1235
1236
|
position: { x: baseX, y },
|
|
1236
|
-
data: {
|
|
1237
|
+
data: isProvider ? {
|
|
1238
|
+
providerName: name,
|
|
1239
|
+
label: name,
|
|
1240
|
+
description: `Provider in ${relativePath}`,
|
|
1241
|
+
providerItems: []
|
|
1242
|
+
} : {
|
|
1237
1243
|
componentName: name,
|
|
1238
1244
|
props: propsType,
|
|
1239
1245
|
label: name,
|
|
@@ -1263,11 +1269,17 @@ function extractComponents(sourceFile, relativePath, gitHash, baseX, startY, nod
|
|
|
1263
1269
|
const propsParam = params[0];
|
|
1264
1270
|
const propsType = propsParam ? propsParam.getType().getText() : "any";
|
|
1265
1271
|
const returnAnalysis = analyzeReturnStatements(init);
|
|
1272
|
+
const isProvider = name.endsWith("Provider");
|
|
1266
1273
|
const node = {
|
|
1267
1274
|
id,
|
|
1268
|
-
type: "component",
|
|
1275
|
+
type: isProvider ? "provider" : "component",
|
|
1269
1276
|
position: { x: baseX, y },
|
|
1270
|
-
data: {
|
|
1277
|
+
data: isProvider ? {
|
|
1278
|
+
providerName: name,
|
|
1279
|
+
label: name,
|
|
1280
|
+
description: `Provider in ${relativePath}`,
|
|
1281
|
+
providerItems: []
|
|
1282
|
+
} : {
|
|
1271
1283
|
componentName: name,
|
|
1272
1284
|
props: propsType,
|
|
1273
1285
|
label: name,
|
|
@@ -1482,17 +1494,18 @@ function createExternalComponentNode(componentName, packageName, sourceFilePath,
|
|
|
1482
1494
|
if (externalNodeMap.has(externalId)) {
|
|
1483
1495
|
return externalNodeMap.get(externalId);
|
|
1484
1496
|
}
|
|
1497
|
+
const isProvider = componentName.endsWith("Provider");
|
|
1485
1498
|
const isRouterProvider = componentName === "RouterProvider" && packageName === "@tanstack/react-router";
|
|
1486
1499
|
const node = {
|
|
1487
1500
|
id: externalId,
|
|
1488
|
-
type:
|
|
1501
|
+
type: isProvider ? "provider" : "component",
|
|
1489
1502
|
position: { x: 1200, y: nodes.length * 150 },
|
|
1490
1503
|
// Position externals to the right
|
|
1491
|
-
data:
|
|
1504
|
+
data: isProvider ? {
|
|
1492
1505
|
providerName: componentName,
|
|
1493
1506
|
label: componentName,
|
|
1494
1507
|
description: `External: ${packageName}`,
|
|
1495
|
-
providerItems: routerConfig ? formatRouterConfigAsProviderItems(routerConfig) : []
|
|
1508
|
+
providerItems: isRouterProvider && routerConfig ? formatRouterConfigAsProviderItems(routerConfig) : []
|
|
1496
1509
|
} : {
|
|
1497
1510
|
componentName,
|
|
1498
1511
|
props: "external",
|
package/dist/index.js
CHANGED
package/dist/vite-plugin.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rayburst/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Rayburst - Automatic code analysis for TypeScript/JavaScript projects via Vite plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"zod": "^4.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@rayburst/types": "^0.1.
|
|
50
|
+
"@rayburst/types": "^0.1.7",
|
|
51
51
|
"@types/node": "^25.0.2",
|
|
52
52
|
"tsup": "^8.5.1",
|
|
53
53
|
"typescript": "^5.9.3",
|