@rayburst/cli 0.4.15 → 0.4.17
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.
|
@@ -2022,6 +2022,38 @@ var unpluginFactory = (options = {}) => {
|
|
|
2022
2022
|
console.log(chalk.yellow(`[Rayburst] Detected ${changes.length} node changes in branch ${branchId}`));
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
|
+
} else {
|
|
2026
|
+
for (const branchId of Object.keys(newAnalysis.planData)) {
|
|
2027
|
+
const nodes = newAnalysis.planData[branchId]?.nodes || [];
|
|
2028
|
+
const timestamp = Date.now();
|
|
2029
|
+
const changes = [];
|
|
2030
|
+
const unstagedFiles = newAnalysis.unstagedFilesMetadata?.[branchId] || [];
|
|
2031
|
+
const stagedFiles = newAnalysis.stagedFilesMetadata?.[branchId] || [];
|
|
2032
|
+
const committedFiles = newAnalysis.committedFilesMetadata?.[branchId] || [];
|
|
2033
|
+
const changedFilePaths = /* @__PURE__ */ new Set();
|
|
2034
|
+
const normalizeFilePath = (absPath) => {
|
|
2035
|
+
return absPath.replace(projectPath, "").replace(/^\//, "");
|
|
2036
|
+
};
|
|
2037
|
+
unstagedFiles.forEach((f) => changedFilePaths.add(normalizeFilePath(f.filePath)));
|
|
2038
|
+
stagedFiles.forEach((f) => changedFilePaths.add(normalizeFilePath(f.filePath)));
|
|
2039
|
+
committedFiles.forEach((f) => changedFilePaths.add(normalizeFilePath(f.filePath)));
|
|
2040
|
+
for (const node of nodes) {
|
|
2041
|
+
const filePath = node.id.split("::")[0];
|
|
2042
|
+
if (changedFilePaths.has(filePath)) {
|
|
2043
|
+
changes.push({
|
|
2044
|
+
timestamp,
|
|
2045
|
+
nodeId: node.id,
|
|
2046
|
+
changeType: "modified",
|
|
2047
|
+
currentState: node,
|
|
2048
|
+
filePath
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
if (changes.length > 0) {
|
|
2053
|
+
addToChangeHistory(branchId, changes);
|
|
2054
|
+
console.log(chalk.yellow(`[Rayburst] Initialized timeline with ${changes.length} nodes from uncommitted files`));
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2025
2057
|
}
|
|
2026
2058
|
newAnalysis.changeHistory = { ...changeHistoryMap };
|
|
2027
2059
|
if (previousAnalysis) {
|
package/dist/index.js
CHANGED
package/dist/vite-plugin.js
CHANGED