tapbundle/ts_node/index.ts

21 lines
477 B
TypeScript
Raw Normal View History

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();