fix(core): tidy formatting and minor fixes across CLI, SNMP, HTTP server, migrations and packaging
This commit is contained in:
@@ -9,7 +9,7 @@ import { spawn } from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, join } from 'path';
|
||||
import { existsSync } from 'fs';
|
||||
import { platform, arch } from 'os';
|
||||
import { arch, platform } from 'os';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -25,12 +25,12 @@ function getBinaryName() {
|
||||
const platformMap = {
|
||||
'darwin': 'macos',
|
||||
'linux': 'linux',
|
||||
'win32': 'windows'
|
||||
'win32': 'windows',
|
||||
};
|
||||
|
||||
const archMap = {
|
||||
'x64': 'x64',
|
||||
'arm64': 'arm64'
|
||||
'arm64': 'arm64',
|
||||
};
|
||||
|
||||
const mappedPlatform = platformMap[plat];
|
||||
@@ -76,7 +76,7 @@ function executeBinary() {
|
||||
// Spawn the binary with all arguments passed through
|
||||
const child = spawn(binaryPath, process.argv.slice(2), {
|
||||
stdio: 'inherit',
|
||||
shell: false
|
||||
shell: false,
|
||||
});
|
||||
|
||||
// Handle child process events
|
||||
@@ -95,7 +95,7 @@ function executeBinary() {
|
||||
|
||||
// Forward signals to child process
|
||||
const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
|
||||
signals.forEach(signal => {
|
||||
signals.forEach((signal) => {
|
||||
process.on(signal, () => {
|
||||
if (!child.killed) {
|
||||
child.kill(signal);
|
||||
@@ -105,4 +105,4 @@ function executeBinary() {
|
||||
}
|
||||
|
||||
// Execute
|
||||
executeBinary();
|
||||
executeBinary();
|
||||
|
||||
Reference in New Issue
Block a user