sftp-deployer
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -10,2 +10,3 @@ "use strict"; | ||
async function deployToStaging({ sshClient, stagingDir, remoteFilePath, progress, succeed }) { | ||
const startTime = new Date().getTime(); | ||
progress('Deploying to staging...'); | ||
@@ -16,5 +17,6 @@ await ssh_exec_cmd_1.sshExecCommand(sshClient, 'rm', ['-rf', stagingDir]); | ||
await ssh_exec_cmd_1.sshExecCommand(sshClient, 'rm', ['-v', remoteFilePath]); | ||
succeed(`Deploy to staging successful: ${chalk_1.default.green(stagingDir)}`); | ||
const elapsed = 0.001 * (new Date().getTime() - startTime); | ||
succeed(`Deploy to staging successful: ${chalk_1.default.green(stagingDir)} ${chalk_1.default.gray(`[${elapsed.toFixed(1)}s]`)}`); | ||
} | ||
exports.deployToStaging = deployToStaging; | ||
//# sourceMappingURL=deploy-to-staging.js.map |
@@ -49,2 +49,3 @@ #!/usr/bin/env node | ||
const sftpClient = new ssh2_sftp_client_1.default(); | ||
const startConnect = new Date().getTime(); | ||
await sftpClient.connect({ | ||
@@ -57,3 +58,4 @@ host, | ||
const sshClient = sftpClient.client; | ||
succeed(`Connected to ${chalk_1.default.cyan(`${host}:${port}`)}`); | ||
const elapsedConnect = 0.001 * (new Date().getTime() - startConnect); | ||
succeed(`Connected to ${chalk_1.default.cyan(`${host}:${port}`)} ${chalk_1.default.gray(`[${elapsedConnect.toFixed(1)}s]`)}`); | ||
try { | ||
@@ -60,0 +62,0 @@ const remoteFilePath = `${uploadDir}/build-${new Date().getTime()}.tar.gz`; |
{ | ||
"name": "sftp-deployer", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "A command-line tool for lightning-fast SFTP deployments", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
26125
488
0