fix(core): update

This commit is contained in:
2022-10-11 13:05:29 +02:00
parent f0b52c8da7
commit d577a82a7b
19 changed files with 4402 additions and 2395 deletions

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartssh',
version: '1.2.5',
description: 'setups SSH quickly and in a painless manner'
}

View File

@ -1,6 +1,6 @@
import * as plugins from './smartssh.plugins';
import * as plugins from './smartssh.plugins.js';
export { SshInstance } from './smartssh.classes.sshinstance';
export { SshKey } from './smartssh.classes.sshkey';
export { SshDir } from './smartssh.classes.sshdir';
export { SshConfig } from './smartssh.classes.sshconfig';
export { SshInstance } from './smartssh.classes.sshinstance.js';
export { SshKey } from './smartssh.classes.sshkey.js';
export { SshDir } from './smartssh.classes.sshdir.js';
export { SshConfig } from './smartssh.classes.sshconfig.js';

View File

@ -1,7 +1,7 @@
import * as plugins from './smartssh.plugins';
import { SshKey } from './smartssh.classes.sshkey';
import * as plugins from './smartssh.plugins.js';
import { SshKey } from './smartssh.classes.sshkey.js';
export let sshKeyArrayFromDir = function(dirArg: string): SshKey[] {
export let sshKeyArrayFromDir = function (dirArg: string): SshKey[] {
let sshKeyArray = []; // TODO
return sshKeyArray;
};

View File

@ -1,6 +1,6 @@
import * as plugins from './smartssh.plugins';
import * as helpers from './smartssh.classes.helpers';
import { SshKey } from './smartssh.classes.sshkey';
import * as plugins from './smartssh.plugins.js';
import * as helpers from './smartssh.classes.helpers.js';
import { SshKey } from './smartssh.classes.sshkey.js';
export class SshConfig {
private _sshKeyArray: SshKey[];
@ -34,7 +34,7 @@ export class SshConfig {
configArray.push({
configString: configString,
authorized: sshKey.authorized,
sshKey: sshKey
sshKey: sshKey,
});
}
let configFile: string = '';

View File

@ -1,8 +1,8 @@
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';
import * as plugins from './smartssh.plugins.js';
import * as helpers from './smartssh.classes.helpers.js';
import { SshInstance } from './smartssh.classes.sshinstance.js';
import { SshKey } from './smartssh.classes.sshkey.js';
import { SshConfig } from './smartssh.classes.sshconfig.js';
export class SshDir {
// sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
@ -23,7 +23,7 @@ export class SshDir {
// syncs sshInstance to directory
let path = this._path;
if (dirPathArg) path = dirPathArg;
this._sshKeyArray.forEach(sshKeyArg => {
this._sshKeyArray.forEach((sshKeyArg) => {
sshKeyArg.store(path);
});
this._sshConfig.store(path);

View File

@ -1,9 +1,9 @@
import * as plugins from './smartssh.plugins';
import * as helpers from './smartssh.classes.helpers';
import * as plugins from './smartssh.plugins.js';
import * as helpers from './smartssh.classes.helpers.js';
import { SshDir } from './smartssh.classes.sshdir';
import { SshConfig } from './smartssh.classes.sshconfig';
import { SshKey } from './smartssh.classes.sshkey';
import { SshDir } from './smartssh.classes.sshdir.js';
import { SshConfig } from './smartssh.classes.sshconfig.js';
import { SshKey } from './smartssh.classes.sshkey.js';
/**
* SshInstance is the main class dealing with ssh management
@ -45,7 +45,7 @@ export class SshInstance {
// non altering methods
getKey(hostArg: string): SshKey {
this._syncAuto('from');
let filteredArray = this._sshKeyArray.filter(function(keyArg) {
let filteredArray = this._sshKeyArray.filter(function (keyArg) {
return keyArg.host === hostArg;
});
if (filteredArray.length > 0) {

View File

@ -1,5 +1,5 @@
import * as plugins from './smartssh.plugins';
import * as helpers from './smartssh.classes.helpers';
import * as plugins from './smartssh.plugins.js';
import * as helpers from './smartssh.classes.helpers.js';
export class SshKey {
private _privKey: string;
@ -8,7 +8,7 @@ export class SshKey {
private _authorized: boolean;
private _smarthshellInstance = new plugins.shelljs.Smartshell({
executor: 'bash'
executor: 'bash',
});
/**