@rayburst/cli 0.4.19 → 0.4.21

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.
@@ -500,7 +500,6 @@ function createRouterDecisionNode(sourceFilePath, gitHash, routeCount) {
500
500
  return {
501
501
  id: `${sourceFilePath}::RouterDecision::${gitHash}`,
502
502
  type: "switch",
503
- position: { x: 600, y: 400 },
504
503
  data: {
505
504
  label: "Router (TanStack)",
506
505
  description: `URL-based routing decision tree with ${routeCount} routes`,
@@ -838,7 +837,6 @@ function detectConfigBasedComponents(sourceFile, nodes, nodeMap, edges, projectP
838
837
  const decisionNode = {
839
838
  id: decisionNodeId,
840
839
  type: "conditional",
841
- position: { x: 800, y: 400 + decisionNodesCreated * 100 },
842
840
  data: {
843
841
  label: isDynamic ? `matches "${routePath}"` : `path === "${routePath}"`,
844
842
  description: `Route condition for ${routePath}`,
@@ -1429,7 +1427,6 @@ function extractComponents(sourceFile, relativePath, gitHash, baseX, startY, nod
1429
1427
  const node = {
1430
1428
  id,
1431
1429
  type: isProvider ? "provider" : "component",
1432
- position: { x: baseX, y },
1433
1430
  data: isProvider ? {
1434
1431
  providerName: name,
1435
1432
  label: name,
@@ -1470,7 +1467,6 @@ function extractComponents(sourceFile, relativePath, gitHash, baseX, startY, nod
1470
1467
  const node = {
1471
1468
  id,
1472
1469
  type: isProvider ? "provider" : "component",
1473
- position: { x: baseX, y },
1474
1470
  data: isProvider ? {
1475
1471
  providerName: name,
1476
1472
  label: name,
@@ -1517,7 +1513,6 @@ function extractFunctions(sourceFile, relativePath, gitHash, baseX, startY, node
1517
1513
  const node = {
1518
1514
  id,
1519
1515
  type: "function",
1520
- position: { x: baseX, y },
1521
1516
  data: {
1522
1517
  functionName: name,
1523
1518
  parameters: params,
@@ -1560,7 +1555,6 @@ function extractState(sourceFile, relativePath, gitHash, baseX, startY, nodes, n
1560
1555
  const node = {
1561
1556
  id,
1562
1557
  type: "state",
1563
- position: { x: baseX, y },
1564
1558
  data: {
1565
1559
  stateName,
1566
1560
  stateType,
@@ -1696,8 +1690,6 @@ function createExternalComponentNode(componentName, packageName, sourceFilePath,
1696
1690
  const node = {
1697
1691
  id: externalId,
1698
1692
  type: isProvider ? "provider" : "component",
1699
- position: { x: 1200, y: nodes.length * 150 },
1700
- // Position externals to the right
1701
1693
  data: isProvider ? {
1702
1694
  providerName: componentName,
1703
1695
  label: componentName,
@@ -2122,7 +2114,27 @@ var unpluginFactory = (options = {}) => {
2122
2114
  },
2123
2115
  configureServer(server) {
2124
2116
  if (!enabled) return;
2125
- console.log(chalk.blue("[Rayburst] Configuring git watcher..."));
2117
+ console.log(chalk.blue("[Rayburst] Configuring file watcher..."));
2118
+ const handleSourceFileChange = (changedPath) => {
2119
+ if (!changedPath.match(/\.(ts|tsx|js|jsx)$/)) {
2120
+ return;
2121
+ }
2122
+ if (changedPath.includes("node_modules") || changedPath.includes(".rayburst") || changedPath.includes(".test.") || changedPath.includes(".spec.")) {
2123
+ return;
2124
+ }
2125
+ console.log(chalk.yellow(`[Rayburst] File changed: ${changedPath}`));
2126
+ if (debounceTimer) {
2127
+ clearTimeout(debounceTimer);
2128
+ }
2129
+ debounceTimer = setTimeout(() => {
2130
+ const relativePath = changedPath.replace(config.root, "").replace(/^\//, "");
2131
+ console.log(chalk.dim(`[Rayburst] Triggering analysis after debounce for: ${relativePath}`));
2132
+ runAnalysis(changedPath);
2133
+ }, debounceMs);
2134
+ };
2135
+ server.watcher.on("change", handleSourceFileChange);
2136
+ server.watcher.on("add", handleSourceFileChange);
2137
+ server.watcher.on("unlink", handleSourceFileChange);
2126
2138
  const gitHeadPath = path4.join(config.root, ".git", "HEAD");
2127
2139
  if (fs3.existsSync(gitHeadPath)) {
2128
2140
  server.watcher.add(gitHeadPath);
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  readLocalMeta,
10
10
  writeLocalAnalysis,
11
11
  writeLocalMeta
12
- } from "./chunk-BZEJKNN6.js";
12
+ } from "./chunk-R5V4WEFD.js";
13
13
  export {
14
14
  addGitignoreEntry,
15
15
  analyzeProject,
@@ -2,7 +2,7 @@ import {
2
2
  rayburstPlugin,
3
3
  unpluginFactory,
4
4
  vite_plugin_default
5
- } from "./chunk-BZEJKNN6.js";
5
+ } from "./chunk-R5V4WEFD.js";
6
6
  export {
7
7
  vite_plugin_default as default,
8
8
  rayburstPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayburst/cli",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "description": "Rayburst - Automatic code analysis for TypeScript/JavaScript projects via Vite plugin",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,14 +42,13 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@rayburst/cli": "^0.4.9",
45
+ "@rayburst/types": "^0.1.13",
46
46
  "chalk": "^5.3.0",
47
47
  "ts-morph": "^21.0.1",
48
48
  "unplugin": "^1.16.1",
49
49
  "zod": "^4.2.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@rayburst/types": "file:../rayburst-types",
53
52
  "@types/node": "^25.0.2",
54
53
  "tsup": "^8.5.1",
55
54
  "typescript": "^5.9.3",