fix(core): update

This commit is contained in:
2019-09-03 15:21:30 +02:00
parent 513337355f
commit 49ebf991a2
9 changed files with 180 additions and 180 deletions

View File

@@ -0,0 +1,53 @@
import * as plugins from './smartdaemon.plugins';
import * as paths from './smartdaemon.paths';
import { SmartDaemon } from './smartdaemon.classes.smartdaemon';
export interface SmartDaemonServiceConstructorOptions {
name: string;
command: string;
workingDir: string;
}
/**
* represents a service that is being spawned by SmartDaemon
*/
export class SmartDaemonService implements SmartDaemonServiceConstructorOptions {
public static async createFromOptions(smartdaemonRef: SmartDaemon, optionsArg: SmartDaemonServiceConstructorOptions) {
const service = new SmartDaemonService(smartdaemonRef);
for (const key of Object.keys(optionsArg)) {
service[key] = optionsArg[key];
}
}
public options: SmartDaemonServiceConstructorOptions;
public name: string;
public command: string;
public workingDir: string;
public smartdaemonRef: SmartDaemon;
constructor(smartdaemonRegfArg: SmartDaemon) {
this.smartdaemonRef = smartdaemonRegfArg;
}
/**
* enables the service
*/
public async enable() {
this.smartdaemonRef
}
/**
* disables the service
*/
public async disable() {
}
/**
* pauses the service
*/
public pause() {};
}