fix(build): update tooling configuration and align nginx certificate generation with current dependencies
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartnginx',
|
||||
version: '2.0.54',
|
||||
version: '2.0.55',
|
||||
description: 'A TypeScript library for controlling Nginx from Node.js, with support for generating and managing Nginx configurations dynamically.'
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class NginxHost implements IHostConfig {
|
||||
public hostName: string; // the host name e.g. domain name
|
||||
public destination: string;
|
||||
public destinationPort: number;
|
||||
public configString: string; // the actual host config file as string
|
||||
public configString = ''; // the actual host config file as string
|
||||
public privateKey: string;
|
||||
public publicKey: string;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ChildProcess } from 'child_process';
|
||||
export class NginxProcess {
|
||||
public started: boolean = false;
|
||||
public smartNginxRef: SmartNginx;
|
||||
private nginxChildProcess: ChildProcess;
|
||||
private nginxChildProcess?: ChildProcess;
|
||||
private smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash',
|
||||
});
|
||||
@@ -62,6 +62,6 @@ export class NginxProcess {
|
||||
* checks if nginx is in path
|
||||
*/
|
||||
public check(): boolean {
|
||||
return;
|
||||
return Boolean(this.nginxChildProcess);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class SmartNginx {
|
||||
this.options.logger
|
||||
? (this.logger = this.options.logger)
|
||||
: (this.logger = new plugins.smartlog.Smartlog({
|
||||
logContext: null
|
||||
logContext: {}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -122,10 +122,9 @@ export class SmartNginx {
|
||||
);
|
||||
|
||||
// write standard self signed certificate
|
||||
const selfsignedCert = plugins.selfsigned.generate(
|
||||
[{ name: 'commonName', value: 'selfsigned.git.zone' }],
|
||||
{ days: 365 }
|
||||
);
|
||||
const selfsignedCert = await plugins.selfsigned.generate([
|
||||
{ name: 'commonName', value: 'selfsigned.git.zone' },
|
||||
]);
|
||||
|
||||
// deploy hosts
|
||||
await plugins.fs.directory(paths.nginxHostDirPath).recursive().create();
|
||||
|
||||
Reference in New Issue
Block a user