@rayburst/cli 0.4.2 → 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,
|
package/dist/index.js
CHANGED
package/dist/vite-plugin.js
CHANGED