fix(core): update

This commit is contained in:
2023-07-26 16:05:53 +02:00
parent 1b6b2a24f1
commit 509ee83a15
25 changed files with 5181 additions and 1973 deletions

View File

@ -1,9 +1,7 @@
import * as plugins from './smartnginx.plugins';
import * as paths from './smartnginx.paths';
import { SmartNginx } from './smartnginx.classes.smartnginx';
import { NginxHost } from './smartnginx.classes.nginxhost';
import { Smartshell } from '@pushrocks/smartshell';
import * as plugins from './smartnginx.plugins.js';
import * as paths from './smartnginx.paths.js';
import { SmartNginx } from './smartnginx.classes.smartnginx.js';
import { NginxHost } from './smartnginx.classes.nginxhost.js';
import { ChildProcess } from 'child_process';
@ -14,8 +12,8 @@ export class NginxProcess {
public started: boolean = false;
public smartNginxRef: SmartNginx;
private nginxChildProcess: ChildProcess;
private smartshellInstance = new Smartshell({
executor: 'bash'
private smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
});
constructor(nginxRefArg: SmartNginx) {
@ -27,12 +25,12 @@ export class NginxProcess {
*/
public async start() {
if (!this.nginxChildProcess) {
this.nginxChildProcess = (await this.smartshellInstance.execStreaming(
`nginx -c ${paths.nginxConfFile}`
)).childProcess;
this.nginxChildProcess = (
await this.smartshellInstance.execStreaming(`nginx -c ${paths.nginxConfFile}`)
).childProcess;
}
this.started = true;
plugins.smartlog.defaultLogger.log('info', 'started Nginx!');
console.log('info', 'started Nginx!');
}
/**