@rayburst/cli 0.4.20 → 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.
|
@@ -2114,7 +2114,27 @@ var unpluginFactory = (options = {}) => {
|
|
|
2114
2114
|
},
|
|
2115
2115
|
configureServer(server) {
|
|
2116
2116
|
if (!enabled) return;
|
|
2117
|
-
console.log(chalk.blue("[Rayburst] Configuring
|
|
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);
|
|
2118
2138
|
const gitHeadPath = path4.join(config.root, ".git", "HEAD");
|
|
2119
2139
|
if (fs3.existsSync(gitHeadPath)) {
|
|
2120
2140
|
server.watcher.add(gitHeadPath);
|
package/dist/index.js
CHANGED
package/dist/vite-plugin.js
CHANGED