thinkncollab-cli 0.0.31 → 0.0.32
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/commands/pull.js +9 -8
- package/package.json +1 -1
package/commands/pull.js
CHANGED
|
@@ -64,22 +64,23 @@ async function processFolderContent(content, basePath = "") {
|
|
|
64
64
|
continue;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
// ✅ ONLY PROCESS FILES - Skip folders entirely
|
|
67
68
|
if (item.type === "folder") {
|
|
68
|
-
|
|
69
|
-
fs.mkdirSync(itemPath, { recursive: true });
|
|
70
|
-
console.log(chalk.cyan(`📁 Created directory: ${itemPath}`));
|
|
71
|
-
}
|
|
72
|
-
|
|
69
|
+
// Skip folder processing - we only care about files
|
|
73
70
|
if (item.children && item.children.length > 0) {
|
|
71
|
+
// Recursively process children files, but don't create folders
|
|
74
72
|
const result = await processFolderContent(item.children, itemPath);
|
|
75
73
|
downloadedCount += result.downloadedCount;
|
|
76
74
|
skippedCount += result.skippedCount;
|
|
77
75
|
errorCount += result.errorCount;
|
|
78
76
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
fs.mkdirSync(path.dirname(itemPath), { recursive: true });
|
|
77
|
+
continue; // Skip the folder itself
|
|
78
|
+
}
|
|
82
79
|
|
|
80
|
+
// ✅ ONLY FILE PROCESSING LOGIC
|
|
81
|
+
if (item.type === "file" && item.url) {
|
|
82
|
+
try {
|
|
83
|
+
// downloadFile will create necessary directories automatically
|
|
83
84
|
if (fs.existsSync(itemPath)) {
|
|
84
85
|
const existingStats = fs.statSync(itemPath);
|
|
85
86
|
if (existingStats.size === item.size) {
|