diff --git a/.travis.yml b/.travis.yml index a55e94f..fced786 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: script: - NODE_ENV=test npm run coveralls after_success: - - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage before_deploy: - brew update - brew install bower diff --git a/package-lock.json b/package-lock.json index 883765a..b3f9dd1 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pipeline", - "version": "2.0.8", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -944,6 +944,20 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "coveralls": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.4.tgz", + "integrity": "sha512-eyqUWA/7RT0JagiL0tThVhjbIjoiEUyWCjtUJoOPcWoeofP5WK/jb2OJYoBFrR6DvplR+AxOyuBqk4JHkk5ykA==", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.86.0" + } + }, "crc": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", @@ -2897,6 +2911,12 @@ "invert-kv": "^2.0.0" } }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -2975,6 +2995,12 @@ "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", diff --git a/package.json b/package.json index b816738..6c9e0a1 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pipeline", "description": "Be less busy, less mistake in Salesforce metadata deploy", - "version": "2.0.0", + "version": "2.0.1", "private": false, "main": "src/main.js", "dependencies": { @@ -64,6 +64,7 @@ "devDependencies": { "app-builder-lib": "^20.43.0", "chai": "^4.2.0", + "coveralls": "^3.0.4", "electron": "3.1.9", "electron-builder": "^20.43.0", "electron-builder-squirrel-windows": "^20.43.0", diff --git a/src/class/Metadata.js b/src/class/Metadata.js index ed619be..e8146d6 100644 --- a/src/class/Metadata.js +++ b/src/class/Metadata.js @@ -71,7 +71,9 @@ class Metadata { const pipelinePath = path.join(userDataPath, 'pipeline', pid, 'metadata'); const filePath = path.join(pipelinePath, filename); const filePathWithoutName = path.dirname(filePath); - fse.ensureDirSync(filePathWithoutName, '0777'); + if(!fse.pathExistsSync(filePathWithoutName)) { + fse.ensureDirSync(filePathWithoutName, '0777'); + } return filePath } diff --git a/src/class/SfdcApi.js b/src/class/SfdcApi.js index d3659b2..581bb2c 100644 --- a/src/class/SfdcApi.js +++ b/src/class/SfdcApi.js @@ -651,7 +651,9 @@ class SfdcApi { }); unzipper.on('extract', function (log) { // console.log('[SFDC]Finished extracting' + log); - fse.ensureDirSync(sourceZipPath, '0777'); + if(fse.pathExistsSync(sourceZipPath)) { + fse.removeSync(sourceZipPath); + } return callback(null, true); }); unzipper.extract({