jvcs 1.4.8 → 1.4.9

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.
@@ -35,11 +35,6 @@ function shouldIgnoreFolder(folderName) {
35
35
  return IGNORE_FOLDERS.includes(folderName)
36
36
  }
37
37
 
38
- function loadStageSnapshot() {
39
- const stagePath = path.join(JVCS_ROOT, "staging")
40
- return loadDirectoryRecursive(stagePath)
41
- }
42
-
43
38
  function loadDirectoryRecursive(dirPath, baseDir = dirPath, snapshot = {}) {
44
39
 
45
40
  if(!fileExists(dirPath)) return snapshot
@@ -65,6 +60,16 @@ function loadDirectoryRecursive(dirPath, baseDir = dirPath, snapshot = {}) {
65
60
  return snapshot
66
61
  }
67
62
 
63
+ function loadStageSnapshot() {
64
+ const stagePath = path.join(JVCS_ROOT, "staging")
65
+ return loadDirectoryRecursive(stagePath)
66
+ }
67
+
68
+ function loadCommitSnapshot(commitId) {
69
+ const commitPath = path.join(JVCS_ROOT, "commits", commitId)
70
+ return loadDirectoryRecursive(commitPath)
71
+ }
72
+
68
73
  function loadWorkingDirectorySnapshot() {
69
74
  return loadDirectoryRecursive(process.cwd(), process.cwd())
70
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jvcs",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "bin": {
5
5
  "jvcs": "index.js"
6
6
  },