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.
Files changed (2) hide show
  1. package/bin/index.js +11 -5
  2. 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
- version: item.version || 1,
389
- pushedAt: new Date().toISOString(),
390
- roomId: roomId,
391
- pushedBy: email,
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
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thinkncollab-cli",
3
3
  "author": "Raman Singh",
4
- "version": "0.0.35",
4
+ "version": "0.0.36",
5
5
  "description": "CLI tool for ThinkNCollab",
6
6
  "main": "index.js",
7
7
  "bin": {