fix(build): update tooling configuration and align nginx certificate generation with current dependencies

This commit is contained in:
2026-04-30 17:47:40 +00:00
parent 8b9420d9b6
commit 6499ba9ceb
13 changed files with 2297 additions and 1958 deletions
+1 -1
View File
@@ -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.'
}
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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);
}
}
+4 -5
View File
@@ -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();