jvcs 1.0.8 → 1.1.0

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.
@@ -4,15 +4,16 @@ const chalk = require("chalk");
4
4
  const { checkGlobalConfig, getGlobalConfig, checkforjvcs } = require("./utility");
5
5
  const drive = require("../config/drive-config")
6
6
 
7
- function copyDir(targetCommitFolder) {
8
-
9
- const cwd = process.cwd()
10
- const entries = fs.readdirSync(targetCommitFolder, {recursive: true})
7
+ function copyDir(targetCommitFolder, destDir=process.cwd()) {
11
8
 
9
+ const entries = fs.readdirSync(targetCommitFolder, {withFileTypes: true})
10
+
12
11
  for(const entry of entries) {
13
-
12
+
13
+ if (entry.name === ".jvcs") continue;
14
+
14
15
  const srcpath = path.join(targetCommitFolder,entry.name)
15
- const destpath = path.join(cwd,entry.name)
16
+ const destpath = path.join(destDir,entry.name)
16
17
 
17
18
  if(entry.isDirectory()) {
18
19
  fs.mkdirSync(destpath, { recursive: true });
@@ -92,7 +93,7 @@ async function deleteCommitsFromDrive(ids) {
92
93
  }
93
94
  }
94
95
  catch(error) {
95
- console.log(chalk.red(`Failed to delete ${folderName} from remote: ${err.message}`));
96
+ console.log(chalk.red(`Failed to delete ${folderName} from remote: ${error.message}`));
96
97
  }
97
98
  }
98
99
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jvcs",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "bin": {
5
5
  "jvcs": "./index.js"
6
6
  },