fix(core): update
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { DenoDownloader } from './classes.denodownloader.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
import { ScriptServer } from './classes.scriptserver.js';
|
||||
import { DenoExecution } from './classes.denoexecution.js';
|
||||
|
||||
export class SmartDeno {
|
||||
private denoDownloader = new DenoDownloader();
|
||||
private smartshellInstance = new plugins.smarthshell.Smartshell({
|
||||
executor: 'bash'
|
||||
});
|
||||
private scriptServer = new ScriptServer();
|
||||
|
||||
public async init(optionsArg: {
|
||||
public async start(optionsArg: {
|
||||
forceLocalDeno?: boolean;
|
||||
} = {}) {
|
||||
const denoAlreadyInPath = await plugins.smarthshell.which('deno', {
|
||||
@@ -17,5 +17,18 @@ export class SmartDeno {
|
||||
if (!denoAlreadyInPath || optionsArg.forceLocalDeno) {
|
||||
await this.denoDownloader.download(plugins.path.join(paths.nogitDir, 'deno.zip'));
|
||||
}
|
||||
await this.scriptServer.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the smartdeno instance
|
||||
*/
|
||||
public async stop() {
|
||||
|
||||
}
|
||||
|
||||
public async executeScript(scriptArg: string) {
|
||||
const denoExecution = new DenoExecution(this.scriptServer, scriptArg);
|
||||
await denoExecution.execute();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user