ccgather 2.0.5 → 2.0.6
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.
- package/dist/index.js +1 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -726,44 +726,29 @@ function extractProjectName(filePath) {
|
|
|
726
726
|
}
|
|
727
727
|
return "unknown";
|
|
728
728
|
}
|
|
729
|
-
var DEBUG = process.env.CCGATHER_DEBUG === "1" || process.env.CCGATHER_DEBUG === "true";
|
|
730
|
-
function debugLog(...args) {
|
|
731
|
-
if (DEBUG) {
|
|
732
|
-
console.log("[DEBUG]", ...args);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
729
|
function getClaudeProjectsDirs() {
|
|
736
730
|
const dirs = [];
|
|
737
731
|
const home = os2.homedir();
|
|
738
|
-
debugLog("Home directory:", home);
|
|
739
|
-
debugLog("Platform:", process.platform);
|
|
740
732
|
const configDir = process.env.CLAUDE_CONFIG_DIR;
|
|
741
733
|
if (configDir) {
|
|
742
734
|
const envPath = path2.join(configDir, "projects");
|
|
743
735
|
dirs.push(envPath);
|
|
744
|
-
debugLog("CLAUDE_CONFIG_DIR path:", envPath);
|
|
745
736
|
}
|
|
746
737
|
if (process.platform === "win32") {
|
|
747
738
|
const appData = process.env.APPDATA;
|
|
748
739
|
if (appData) {
|
|
749
740
|
const appDataPath = path2.join(appData, "claude", "projects");
|
|
750
741
|
dirs.push(appDataPath);
|
|
751
|
-
debugLog("APPDATA path:", appDataPath);
|
|
752
742
|
}
|
|
753
743
|
}
|
|
754
744
|
const xdgPath = path2.join(home, ".config", "claude", "projects");
|
|
755
745
|
dirs.push(xdgPath);
|
|
756
|
-
debugLog("XDG path:", xdgPath);
|
|
757
746
|
const legacyPath = path2.join(home, ".claude", "projects");
|
|
758
747
|
dirs.push(legacyPath);
|
|
759
|
-
debugLog("Legacy path:", legacyPath);
|
|
760
748
|
const uniqueDirs = [...new Set(dirs)];
|
|
761
749
|
const existingDirs = uniqueDirs.filter((dir) => {
|
|
762
|
-
|
|
763
|
-
debugLog(`Path ${dir} exists:`, exists);
|
|
764
|
-
return exists;
|
|
750
|
+
return fs2.existsSync(dir);
|
|
765
751
|
});
|
|
766
|
-
debugLog("Existing project dirs:", existingDirs);
|
|
767
752
|
return existingDirs;
|
|
768
753
|
}
|
|
769
754
|
function encodePathLikeClaude(inputPath) {
|
|
@@ -885,7 +870,6 @@ function getSessionPathDebugInfo() {
|
|
|
885
870
|
function scanAllProjects(options = {}) {
|
|
886
871
|
const projectsDirs = getClaudeProjectsDirs();
|
|
887
872
|
if (projectsDirs.length === 0) {
|
|
888
|
-
debugLog("No project directories found");
|
|
889
873
|
return null;
|
|
890
874
|
}
|
|
891
875
|
const days = options.days ?? 0;
|
|
@@ -924,7 +908,6 @@ function scanAllProjects(options = {}) {
|
|
|
924
908
|
}
|
|
925
909
|
}
|
|
926
910
|
if (allJsonlFiles.length === 0) {
|
|
927
|
-
debugLog("No JSONL files found in any project");
|
|
928
911
|
return null;
|
|
929
912
|
}
|
|
930
913
|
sessionsCount = allJsonlFiles.length;
|