fix(core): update
This commit is contained in:
21
ts/classes.denoexecution.ts
Normal file
21
ts/classes.denoexecution.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { ScriptServer } from './classes.scriptserver.js';
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
/* This file contains logic to execute deno commands in an ephermal way */
|
||||
|
||||
export class DenoExecution {
|
||||
public id: string;
|
||||
public scriptserverRef: ScriptServer;
|
||||
public script: string;
|
||||
|
||||
constructor(scriptserverRef: ScriptServer, scriptArg: string) {
|
||||
this.scriptserverRef = scriptserverRef;
|
||||
this.script = scriptArg;
|
||||
this.id = plugins.smartunique.shortId();
|
||||
}
|
||||
|
||||
public async execute() {
|
||||
this.scriptserverRef.executionMap.add(this);
|
||||
await this.scriptserverRef.smartshellInstance.exec(`deno run http://localhost:3210/getscript/${this.id}`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user