@connectedcars/device-modules
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -108,3 +108,4 @@ "use strict"; | ||
const progressStr = printStatus === true ? `--progress ` : ``; | ||
return cmd.run(`rsync --mkpath -bavzP ${RSYNC_SSH_OPTIONS} ${progressStr}${recursiveStr}${sourcePath} ${userName}@${ip}:${destinationPath}`, timeout, false, printStatus === true ? logCallback : undefined); | ||
const localTmp = `/tmp/random-folder-${ip}:${util.hash(destinationPath)}`; | ||
return cmd.run(`rsync --mkpath -bavzP --timeout=30 --partial-dir=${localTmp} ${RSYNC_SSH_OPTIONS} ${progressStr}${recursiveStr}${sourcePath} ${userName}@${ip}:${destinationPath}`, timeout, false, printStatus === true ? logCallback : undefined); | ||
} | ||
@@ -116,3 +117,5 @@ | ||
const progressStr = printStatus === true ? `--progress ` : ``; | ||
return cmd.run(`rsync --mkpath -bavzP ${RSYNC_SSH_OPTIONS} ${progressStr}${recursiveStr}${userName}@${ip}:${sourcePath} ${destinationPath}`, timeout, false, printStatus === true ? logCallback : undefined); | ||
const localTmp = `/tmp/random-folder-${ip}:${util.hash(destinationPath)}`; | ||
const result = cmd.run(`rsync --mkpath -bavzP --timeout=30 --partial-dir=${localTmp} ${RSYNC_SSH_OPTIONS} ${progressStr}${recursiveStr}${userName}@${ip}:${sourcePath} ${destinationPath}`, timeout, false, printStatus === true ? logCallback : undefined); | ||
return result; | ||
} | ||
@@ -119,0 +122,0 @@ |
@@ -29,1 +29,2 @@ /// <reference types="node" /> | ||
export declare function downloadFile(saveFileLocation: string, downloadUrl: string): Promise<void>; | ||
export declare function hash(value: string): string; |
@@ -10,2 +10,3 @@ "use strict"; | ||
exports.getDateTimeStr = getDateTimeStr; | ||
exports.hash = hash; | ||
exports.sleep = void 0; | ||
@@ -15,2 +16,4 @@ exports.sleepSecsAndUpdate = sleepSecsAndUpdate; | ||
var crypto = _interopRequireWildcard(require("crypto")); | ||
var fs = _interopRequireWildcard(require("fs")); | ||
@@ -100,2 +103,6 @@ | ||
} | ||
function hash(value) { | ||
return crypto.createHash('sha256').update(value).digest('hex'); | ||
} | ||
//# sourceMappingURL=util.js.map |
{ | ||
"name": "@connectedcars/device-modules", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79766
626
2