update structure
This commit is contained in:
parent
9bc3aea59c
commit
bf27aaf167
@ -18,6 +18,7 @@ export class SshConfig {
|
|||||||
|
|
||||||
return done.promise;
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
readConfig
|
||||||
};
|
};
|
||||||
|
|
||||||
let createConfigPath = () => {
|
let createConfigPath = () => {
|
||||||
|
@ -72,12 +72,12 @@ export class SshKey {
|
|||||||
read(filePathArg){
|
read(filePathArg){
|
||||||
|
|
||||||
}
|
}
|
||||||
store(filePathArg?:string){
|
store(dirPathArg?:string){
|
||||||
let filePathObj = plugins.path.parse(filePathArg);
|
let filePathObj = plugins.path.parse(dirPathArg);
|
||||||
if(filePathObj.ext = ".priv"){
|
if(filePathObj.ext = ".priv"){
|
||||||
plugins.smartfile.memory.toFsSync(this._privKey,filePathArg);
|
plugins.smartfile.memory.toFsSync(this._privKey,dirPathArg);
|
||||||
} else if (filePathObj.ext = ".pub"){
|
} else if (filePathObj.ext = ".pub"){
|
||||||
plugins.smartfile.memory.toFsSync(this._pubKey,filePathArg);
|
plugins.smartfile.memory.toFsSync(this._pubKey,dirPathArg);
|
||||||
} else { //we assume we are given a directory as filePathArg, so we store the whole key
|
} else { //we assume we are given a directory as filePathArg, so we store the whole key
|
||||||
plugins.fs.ensureDirSync(filePathObj.dir);
|
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
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"version": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"ambientDependencies": {
|
|
||||||
"colors": "registry:dt/colors#0.6.0-1+20160317120654",
|
|
||||||
"node": "registry:dt/node#4.0.0+20160423143914"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user