thinkncollab-cli 0.0.35 → 0.0.36
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/bin/index.js +11 -5
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -384,12 +384,18 @@ async function push(roomId, targetPath) {
|
|
|
384
384
|
};
|
|
385
385
|
flattenAndStore(uploadedTree);
|
|
386
386
|
saveVersions(newVersionMap);
|
|
387
|
+
|
|
388
|
+
// Determine latest version number from uploaded files
|
|
389
|
+
const versionNumbers = Object.values(newVersionMap).map(f => f.version || 1);
|
|
390
|
+
const latestVersion = versionNumbers.length > 0 ? Math.max(...versionNumbers) : 1;
|
|
391
|
+
|
|
387
392
|
const newPushRecord = {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
+
version: latestVersion,
|
|
394
|
+
pushedAt: new Date().toISOString(),
|
|
395
|
+
roomId: roomId,
|
|
396
|
+
pushedBy: email,
|
|
397
|
+
projectId: projectId
|
|
398
|
+
};
|
|
393
399
|
|
|
394
400
|
|
|
395
401
|
|