made all classes start with capital letters

This commit is contained in:
2016-05-31 19:16:45 +02:00
parent eb66ed0244
commit cd6bcb974c
26 changed files with 331 additions and 188 deletions

View File

@ -1,3 +1,7 @@
import "typings-global"
import * as plugins from "./smartssh.plugins";
import {} from "./smartssh.classes.ssh";
export {Ssh} from "./smartssh.classes.ssh";
export {SshKey} from "./smartssh.classes.sshkey";
export {SshDir} from "./smartssh.classes.sshdir";
export {SshConfig} from "./smartssh.classes.sshconfig";

View File

@ -1,8 +1,8 @@
import "typings-global"
import plugins = require("./smartssh.plugins");
import classes = require("./smartssh.classes");
import * as plugins from "./smartssh.plugins";
import {SshKey} from "./smartssh.classes.sshkey";
export let sshKeyArrayFromDir = function(dirArg:string):classes.sshKey[]{
export let sshKeyArrayFromDir = function(dirArg:string):SshKey[]{
let sshKeyArray = []; //TODO
return sshKeyArray;
}

View File

@ -2,19 +2,21 @@ import "typings-global"
import * as plugins from "./smartssh.plugins";
import * as helpers from "./smartssh.classes.helpers";
import {sshDir} from "./smartssh.classes.sshdir";
import {SshDir} from "./smartssh.classes.sshdir";
import {SshConfig} from "./smartssh.classes.sshconfig";
import {SshKey} from "./smartssh.classes.sshkey";
export class ssh {
private sshConfig:sshConfig; // points to sshConfig class instance
private sshDir:sshDir; // points to sshDir class instance.
private sshKeys:sshKey[]; //holds all ssh keys
export class Ssh {
private sshConfig:SshConfig; // points to sshConfig class instance
private sshDir:SshDir; // points to sshDir class instance.
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}={}){
this.sshDir = new sshDir(optionsArg.sshDir);
this.sshDir = new SshDir(optionsArg.sshDir);
this.sshKeys = this.sshDir.getKeys();
this.sshSync = optionsArg.sshSync;
};
addKey(sshKeyArg:sshKey){
addKey(sshKeyArg:SshKey){
this.sshKeys.push(sshKeyArg);
this.sync();
};
@ -28,12 +30,12 @@ export class ssh {
return undefined;
}
};
removeKey(sshKeyArg:sshKey){
removeKey(sshKeyArg:SshKey){
let keyIndex = helpers.getKeyIndex(sshKeyArg.host);
this.sshKeys.splice(keyIndex,1);
this.sync();
};
replaceKey(sshKeyOldArg:sshKey,sshKeyNewArg:sshKey){
replaceKey(sshKeyOldArg:SshKey,sshKeyNewArg:SshKey){
let keyIndex = helpers.getKeyIndex(sshKeyOldArg.host);
this.sshKeys.splice(keyIndex,1,sshKeyNewArg);
this.sync();

View File

@ -1,7 +1,7 @@
import "typings-global";
import * as plugins from "./smartssh.plugins";
import * as helpers from "./smartssh.classes.helpers";
export class sshConfig {
export class SshConfig {
constructor(){
}

View File

@ -1,13 +1,14 @@
import "typings-global";
import * as plugins from "./smartssh.plugins";
import * as helpers from "./smartssh.classes.helpers";
import {sshKey} from "./smartssh.classes.sshkey";
export class sshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
import {SshKey} from "./smartssh.classes.sshkey";
import {SshConfig} from "./smartssh.classes.sshconfig";
export class SshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
path:string;
constructor(sshDirPathArg:string){
this.path = sshDirPathArg;
}
sync(sshConfigArg:sshConfig,sshKeysArg:sshKey[]){
sync(sshConfigArg:SshConfig,sshKeysArg:SshKey[]){
};
getKeys(){

View File

@ -2,7 +2,7 @@ import "typings-global";
import * as plugins from "./smartssh.plugins";
import * as helpers from "./smartssh.classes.helpers";
export class sshKey {
export class SshKey {
private privKey:string;
private pubKey:string;
private hostVar:string;