21 lines
477 B
TypeScript
21 lines
477 B
TypeScript
import * as plugins from './plugins.js';
|
|
|
|
class TapNodeTools {
|
|
|
|
private smartshellInstance: plugins.smartshell.Smartshell;
|
|
constructor() {
|
|
|
|
}
|
|
|
|
public async runCommand(commandArg) {
|
|
if (!this.smartshellInstance) {
|
|
this.smartshellInstance = new plugins.smartshell.Smartshell({
|
|
executor: 'bash',
|
|
});
|
|
}
|
|
const result = await this.smartshellInstance.exec(commandArg);
|
|
return result;
|
|
}
|
|
}
|
|
|
|
export const tapNodeTools = new TapNodeTools(); |