forked from StrictlySkyler/ssh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssh.js
executable file
·45 lines (33 loc) · 975 Bytes
/
ssh.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict';
let dependencies = ['ssh2', 'expand-tilde', 'js-htmlencode'].join(' ');
console.log('Installing dependencies:', dependencies, '...');
require('child_process').execSync(
'npm i ' + dependencies
);
console.log('Dependencies installed:', dependencies);
let fs = require('fs');
let expandTilde = require('expand-tilde');
let harbor_dir = expandTilde('~/.harbormaster/harbors');
let Client = require('ssh2')
let Lanes;
let Users;
let Harbors;
let Shipments;
const NAME = 'ssh';
module.exports = {
render_input: eval(
fs.readFileSync(harbor_dir + '/ssh/render_input.js').toString()
),
render_work_preview: eval(
fs.readFileSync(harbor_dir + '/ssh/render_work_preview.js').toString()
),
register: eval(
fs.readFileSync(harbor_dir + '/ssh/register.js').toString()
),
update: eval(
fs.readFileSync(harbor_dir + '/ssh/update.js').toString()
),
work: eval(
fs.readFileSync(harbor_dir + '/ssh/work.js').toString()
)
};