cob-cli 2.52.0-beta-1 → 2.52.0-beta-2
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.
package/package.json
CHANGED
package/lib/task_lists/ssh.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
function getSshArgs(server) {
|
|
2
|
-
const args = [
|
|
3
|
-
"-o", "StrictHostKeyChecking=no",
|
|
4
|
-
"-o", "PreferredAuthentications=publickey",
|
|
5
|
-
"-o", "BatchMode=yes",
|
|
6
|
-
];
|
|
7
|
-
|
|
8
|
-
if (process.env.COB_SSH_PORT) args.push("-p", process.env.COB_SSH_PORT);
|
|
9
|
-
if (process.env.COB_SSH_IDENTITY) args.push("-i", process.env.COB_SSH_IDENTITY);
|
|
10
|
-
|
|
11
|
-
const target = process.env.COB_SSH_USER ? `${process.env.COB_SSH_USER}@${server}` : server;
|
|
12
|
-
args.push(target);
|
|
13
|
-
|
|
14
|
-
return args;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function getServerAddress(server) {
|
|
18
|
-
return process.env.COB_SSH_USER ? `${process.env.COB_SSH_USER}@${server}` : server;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function getRsyncSsh() {
|
|
22
|
-
let cmd = "ssh -o ConnectTimeout=30 -o ServerAliveInterval=30 -o ServerAliveCountMax=30 -o StrictHostKeyChecking=no";
|
|
23
|
-
|
|
24
|
-
if (process.env.COB_SSH_IDENTITY) cmd += ` -i '${process.env.COB_SSH_IDENTITY}'`;
|
|
25
|
-
if (process.env.COB_SSH_PORT) cmd += ` -p ${process.env.COB_SSH_PORT}`;
|
|
26
|
-
|
|
27
|
-
return cmd;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = { getSshArgs, getServerAddress, getRsyncSsh };
|