start tests
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./smartssh.plugins";
|
||||
import * as helpers from "./smartssh.classes.helpers";
|
||||
import {SshInstance} from "./smartssh.classes.sshinstance";
|
||||
import {SshKey} from "./smartssh.classes.sshkey";
|
||||
import {SshConfig} from "./smartssh.classes.sshconfig";
|
||||
export class SshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
|
||||
@ -10,13 +11,16 @@ export class SshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
|
||||
if(sshDirPathArg){
|
||||
sshDirPath = sshDirPathArg;
|
||||
} else {
|
||||
sshDirPath = plugins.smartpath.home
|
||||
sshDirPath = plugins.smartpath.get.home();
|
||||
}
|
||||
this.path = sshDirPath;
|
||||
}
|
||||
sync(sshConfigArg:SshConfig,sshKeysArg:SshKey[]){
|
||||
syncToDir(sshInstanceArg:SshInstance){ //syncs
|
||||
|
||||
};
|
||||
syncFromDir(){
|
||||
|
||||
}
|
||||
getKeys(){
|
||||
return helpers.sshKeyArrayFromDir(this.path);
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export class SshInstance {
|
||||
private sshKeys:SshKey[]; //holds all ssh keys
|
||||
private sshSync:boolean; // if set to true, the ssh dir will be kept in sync automatically
|
||||
constructor(optionsArg:{sshDir?:string,sshSync?:boolean}={}){
|
||||
optionsArg ? void(0) : optionsArg = {};
|
||||
this.sshDir = new SshDir(optionsArg.sshDir);
|
||||
this.sshKeys = this.sshDir.getKeys();
|
||||
this.sshSync = optionsArg.sshSync;
|
||||
|
@ -3,4 +3,5 @@ export let beautylog = require("beautylog");
|
||||
export let base64 = require("js-base64").Base64;
|
||||
export let fs = require("fs-extra");
|
||||
export let path = require("path");
|
||||
export let smartfile = require("smartfile");
|
||||
export let smartfile = require("smartfile");
|
||||
export import smartpath = require("smartpath");
|
Reference in New Issue
Block a user