some restructuring
This commit is contained in:
parent
e5bdfff743
commit
201d5cc6d7
2
dist/smartssh.classes.sshdir.js
vendored
2
dist/smartssh.classes.sshdir.js
vendored
@ -25,4 +25,4 @@ var SshDir = (function () {
|
||||
}());
|
||||
exports.SshDir = SshDir;
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3NoLmNsYXNzZXMuc3NoZGlyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUM5QyxJQUFZLE9BQU8sV0FBTSw0QkFBNEIsQ0FBQyxDQUFBO0FBSXREO0lBR0ksZ0JBQVksY0FBMEIsRUFBQyxhQUFxQjtRQUN4RCxJQUFJLFVBQWlCLENBQUM7UUFDdEIsRUFBRSxDQUFBLENBQUMsYUFBYSxDQUFDLENBQUEsQ0FBQztZQUNkLFVBQVUsR0FBRyxhQUFhLENBQUM7UUFDL0IsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osVUFBVSxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzlDLENBQUM7UUFDRCxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQztJQUMzQixDQUFDO0lBQ0QsMEJBQVMsR0FBVDtJQUVBLENBQUM7O0lBQ0QsNEJBQVcsR0FBWDtJQUVBLENBQUM7SUFDRCx3QkFBTyxHQUFQO1FBQ0ksTUFBTSxDQUFDLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDakQsQ0FBQztJQUNMLGFBQUM7QUFBRCxDQXJCQSxBQXFCQyxJQUFBO0FBckJZLGNBQU0sU0FxQmxCLENBQU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gcGx1Z2lucy5zbWFydHBhdGguZ2V0LmhvbWUoKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnBhdGggPSBzc2hEaXJQYXRoO1xuICAgIH1cbiAgICBzeW5jVG9EaXIoKXsgLy8gc3luY3Mgc3NoSW5zdGFuY2UgdG8gZGlyZWN0b3J5XG4gICAgICAgIFxuICAgIH07XG4gICAgc3luY0Zyb21EaXIoKXsgLy8gc3luY3Mgc3NoSW5zdGFuY2UgZnJvbSBkaXJlY3RvcnlcbiAgICAgICAgXG4gICAgfVxuICAgIGdldEtleXMoKXtcbiAgICAgICAgcmV0dXJuIGhlbHBlcnMuc3NoS2V5QXJyYXlGcm9tRGlyKHRoaXMucGF0aCk7XG4gICAgfVxufSJdfQ==
|
||||
|
2
dist/smartssh.classes.sshinstance.d.ts
vendored
2
dist/smartssh.classes.sshinstance.d.ts
vendored
@ -3,7 +3,7 @@ import { SshKey } from "./smartssh.classes.sshkey";
|
||||
export declare class SshInstance {
|
||||
private sshConfig;
|
||||
private sshDir;
|
||||
private sshKeyArray;
|
||||
protected sshKeyArray: SshKey[];
|
||||
private sshSync;
|
||||
constructor(optionsArg?: {
|
||||
sshDirPath?: string;
|
||||
|
4
dist/smartssh.classes.sshinstance.js
vendored
4
dist/smartssh.classes.sshinstance.js
vendored
File diff suppressed because one or more lines are too long
4
dist/smartssh.classes.sshkey.js
vendored
4
dist/smartssh.classes.sshkey.js
vendored
File diff suppressed because one or more lines are too long
7
dist/smartssh.plugins.d.ts
vendored
7
dist/smartssh.plugins.d.ts
vendored
@ -1,7 +1,8 @@
|
||||
import "typings-global";
|
||||
export declare let beautylog: any;
|
||||
export import beautylog = require("beautylog");
|
||||
export declare let base64: any;
|
||||
export declare let fs: any;
|
||||
export declare let path: any;
|
||||
export declare let smartfile: any;
|
||||
export declare let minimatch: any;
|
||||
export import path = require("path");
|
||||
export import smartfile = require("smartfile");
|
||||
export import smartpath = require("smartpath");
|
||||
|
3
dist/smartssh.plugins.js
vendored
3
dist/smartssh.plugins.js
vendored
@ -3,8 +3,9 @@ require("typings-global");
|
||||
exports.beautylog = require("beautylog");
|
||||
exports.base64 = require("js-base64").Base64;
|
||||
exports.fs = require("fs-extra");
|
||||
exports.minimatch = require("minimatch");
|
||||
exports.path = require("path");
|
||||
exports.smartfile = require("smartfile");
|
||||
exports.smartpath = require("smartpath");
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3NoLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQ1AsQ0FBQyxDQURzQjtBQUNaLGlCQUFTLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0FBQ2pDLGNBQU0sR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUMsTUFBTSxDQUFDO0FBQ3JDLFVBQUUsR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUM7QUFDekIsWUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUN2QixpQkFBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUM5QixpQkFBUyxXQUFXLFdBQVcsQ0FBQyxDQUFDIiwiZmlsZSI6InNtYXJ0c3NoLnBsdWdpbnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgXCJ0eXBpbmdzLWdsb2JhbFwiXG5leHBvcnQgbGV0IGJlYXV0eWxvZyA9IHJlcXVpcmUoXCJiZWF1dHlsb2dcIik7XG5leHBvcnQgbGV0IGJhc2U2NCA9IHJlcXVpcmUoXCJqcy1iYXNlNjRcIikuQmFzZTY0O1xuZXhwb3J0IGxldCBmcyA9IHJlcXVpcmUoXCJmcy1leHRyYVwiKTtcbmV4cG9ydCBsZXQgcGF0aCA9IHJlcXVpcmUoXCJwYXRoXCIpO1xuZXhwb3J0IGxldC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GltcG9ydCBzbWFydGZpbGUgPSByZXF1aXJlKFwic21hcnRmaWxlXCIpO1xuZXhwb3J0IGltcG9ydCBzbWFydHBhdGggPSByZXF1aXJlKFwic21hcnRwYXRoXCIpOyJdfQ==
|
||||
|
@ -26,6 +26,7 @@
|
||||
"beautylog": "^5.0.10",
|
||||
"fs-extra": "^0.30.0",
|
||||
"js-base64": "^2.1.9",
|
||||
"minimatch": "^3.0.0",
|
||||
"smartfile": "^3.0.10",
|
||||
"smartpath": "^3.2.2",
|
||||
"typings-global": "^1.0.3",
|
||||
|
@ -16,10 +16,10 @@ export class SshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
|
||||
}
|
||||
this.path = sshDirPath;
|
||||
}
|
||||
syncToDir(){ //syncs
|
||||
syncToDir(){ // syncs sshInstance to directory
|
||||
|
||||
};
|
||||
syncFromDir(){
|
||||
syncFromDir(){ // syncs sshInstance from directory
|
||||
|
||||
}
|
||||
getKeys(){
|
||||
|
@ -9,13 +9,12 @@ import {SshKey} from "./smartssh.classes.sshkey";
|
||||
export class SshInstance {
|
||||
private sshConfig:SshConfig; // sshConfig (e.g. represents ~/.ssh/config)
|
||||
private sshDir:SshDir; // points to sshDir class instance.
|
||||
private sshKeyArray:SshKey[]; //holds all ssh keys
|
||||
protected sshKeyArray:SshKey[]; //holds all ssh keys
|
||||
private sshSync:boolean; // if set to true, the ssh dir will be kept in sync automatically
|
||||
constructor(optionsArg:{sshDirPath?:string,sshSync?:boolean}={}){
|
||||
optionsArg ? void(0) : optionsArg = {};
|
||||
|
||||
this.sshDir = new SshDir(this,optionsArg.sshDirPath);
|
||||
this.sshKeyArray = this.sshDir.getKeys();
|
||||
this.sshKeyArray = [];
|
||||
this.sshSync = optionsArg.sshSync;
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@ export class SshKey {
|
||||
} else { //we assume we are given a directory as filePathArg, so we store the whole key
|
||||
plugins.fs.ensureDirSync(filePathObj.dir);
|
||||
this.store(plugins.path.join(filePathObj.dir,"key.priv")); // call this function recursivly
|
||||
this.store(plugins.path.join(filePathObj.dir,"key.priv")); // call this function recursivly
|
||||
this.store(plugins.path.join(filePathObj.dir,"key.pub")); // call this function recursivly
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
import "typings-global"
|
||||
export let beautylog = require("beautylog");
|
||||
export import 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 minimatch = require("minimatch");
|
||||
export import path = require("path");
|
||||
export import smartfile = require("smartfile");
|
||||
export import smartpath = require("smartpath");
|
Loading…
Reference in New Issue
Block a user