@rayburst/cli 0.4.8 → 0.4.10
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.
|
@@ -2028,6 +2028,13 @@ function rayburstPlugin(options = {}) {
|
|
|
2028
2028
|
const projectPath = config.root;
|
|
2029
2029
|
const previousAnalysis = await readLocalAnalysis(projectPath);
|
|
2030
2030
|
const newAnalysis = await analyzeProject(projectPath);
|
|
2031
|
+
const branches = Object.keys(newAnalysis.planData);
|
|
2032
|
+
if (!newAnalysis.changeHistory && branches.length > 0) {
|
|
2033
|
+
newAnalysis.changeHistory = {};
|
|
2034
|
+
for (const branchId of branches) {
|
|
2035
|
+
newAnalysis.changeHistory[branchId] = [];
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2031
2038
|
if (previousAnalysis) {
|
|
2032
2039
|
const diff = generateDiff(previousAnalysis, newAnalysis);
|
|
2033
2040
|
if (diff.added.nodes.length > 0 || diff.removed.nodeIds.length > 0 || diff.modified.nodes.length > 0) {
|
|
@@ -2095,25 +2102,32 @@ function rayburstPlugin(options = {}) {
|
|
|
2095
2102
|
// Hook 3: Watch for changes using Vite's built-in watcher
|
|
2096
2103
|
configureServer(server) {
|
|
2097
2104
|
if (!enabled) return;
|
|
2105
|
+
console.log(chalk2.blue("[Rayburst] Configuring file watcher..."));
|
|
2098
2106
|
const handleFileChange = (filePath) => {
|
|
2107
|
+
console.log(chalk2.gray(`[Rayburst] Raw file event: ${filePath}`));
|
|
2099
2108
|
if (!filePath.match(/\.(ts|tsx|js|jsx)$/)) {
|
|
2109
|
+
console.log(chalk2.gray(`[Rayburst] Skipping (not TS/JS): ${filePath}`));
|
|
2100
2110
|
return;
|
|
2101
2111
|
}
|
|
2102
2112
|
if (filePath.includes("node_modules") || filePath.includes(".rayburst") || filePath.includes(".test.") || filePath.includes(".spec.")) {
|
|
2113
|
+
console.log(chalk2.gray(`[Rayburst] Skipping (filtered): ${filePath}`));
|
|
2103
2114
|
return;
|
|
2104
2115
|
}
|
|
2116
|
+
console.log(chalk2.yellow(`[Rayburst] Accepted file change: ${filePath}`));
|
|
2105
2117
|
if (debounceTimer) {
|
|
2106
2118
|
clearTimeout(debounceTimer);
|
|
2107
2119
|
}
|
|
2108
2120
|
debounceTimer = setTimeout(() => {
|
|
2109
2121
|
const relativePath = filePath.replace(config.root, "").replace(/^\//, "");
|
|
2110
|
-
console.log(chalk2.dim(`[Rayburst] File changed: ${relativePath}`));
|
|
2122
|
+
console.log(chalk2.dim(`[Rayburst] File changed (after debounce): ${relativePath}`));
|
|
2111
2123
|
runAnalysis(filePath);
|
|
2112
2124
|
}, debounceMs);
|
|
2113
2125
|
};
|
|
2126
|
+
console.log(chalk2.blue("[Rayburst] Registering watcher event handlers..."));
|
|
2114
2127
|
server.watcher.on("change", handleFileChange);
|
|
2115
2128
|
server.watcher.on("add", handleFileChange);
|
|
2116
2129
|
server.watcher.on("unlink", handleFileChange);
|
|
2130
|
+
console.log(chalk2.blue("[Rayburst] File watcher configured successfully"));
|
|
2117
2131
|
const gitHeadPath = path5.join(config.root, ".git", "HEAD");
|
|
2118
2132
|
if (fs3.existsSync(gitHeadPath)) {
|
|
2119
2133
|
server.watcher.add(gitHeadPath);
|
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.10",
|
|
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,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@rayburst/cli": "^0.4.
|
|
45
|
+
"@rayburst/cli": "^0.4.9",
|
|
46
46
|
"chalk": "^5.3.0",
|
|
47
47
|
"ts-morph": "^21.0.1",
|
|
48
48
|
"zod": "^4.2.0"
|