Skip to content

Commit

Permalink
update ssh2 and mysql packages
Browse files Browse the repository at this point in the history
  • Loading branch information
linusnorton committed Sep 11, 2023
1 parent 2e6eddd commit 51675d7
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 116 deletions.
168 changes: 66 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@
"fs-extra": "^10.0.0",
"memoized-class-decorator": "^1.6.1",
"moment": "^2.29.1",
"mysql2": "^2.3.2",
"ssh2": "^1.4.0",
"ssh2-streams": "^0.4.10",
"mysql2": "^3.6.1",
"ssh2": "^1.14.0",
"stream-to-promise": "^3.0.0"
},
"engines": {
Expand All @@ -56,8 +55,7 @@
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.6",
"@types/ssh2": "^0.5.48",
"@types/ssh2-streams": "^0.1.9",
"@types/ssh2": "^1.11.13",
"@types/stream-to-promise": "^2.2.1",
"chai": "^4.3.4",
"mocha": "^9.1.3",
Expand Down
31 changes: 30 additions & 1 deletion src/cli/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,36 @@ export class Container {
username: process.env.SFTP_USERNAME,
password: process.env.SFTP_PASSWORD,
algorithms: {
serverHostKey: ['ssh-dss']
kex: [
"diffie-hellman-group1-sha1",
"ecdh-sha2-nistp256",
"ecdh-sha2-nistp384",
"ecdh-sha2-nistp521",
"diffie-hellman-group-exchange-sha256",
"diffie-hellman-group14-sha1"
],
cipher: [
"3des-cbc",
"aes128-ctr",
"aes192-ctr",
"aes256-ctr",
"aes128-gcm",
"aes128-gcm@openssh.com",
"aes256-gcm",
"aes256-gcm@openssh.com"
],
serverHostKey: [
"ssh-dss",
"ssh-rsa",
"ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384",
"ecdsa-sha2-nistp521"
],
hmac: [
"hmac-sha2-256",
"hmac-sha2-512",
"hmac-sha1"
]
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/cli/DownloadCommand.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {CLICommand} from "./CLICommand";
import {PromiseSFTP} from "../sftp/PromiseSFTP";
import {FileEntry} from "ssh2-streams";
import {DatabaseConnection} from "../database/DatabaseConnection";
import { FileEntry } from "ssh2";

export class DownloadCommand implements CLICommand {

Expand Down Expand Up @@ -32,7 +32,7 @@ export class DownloadCommand implements CLICommand {

try {
await Promise.all(
files.map(f => this.sftp.fastGet(this.directory + f, outputDirectory + f))
files.map(f => this.sftp.fastGet(this.directory + f, outputDirectory + f, { concurrency: 1 }))
);
}
catch (err) {
Expand Down

0 comments on commit 51675d7

Please sign in to comment.