From bdd4f1d0e00bd36286ac9638cd759c9e293988aa Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:16:03 +0100 Subject: [PATCH] Release 1.1.9 --- src/matterbridge.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/matterbridge.ts b/src/matterbridge.ts index 84d3ce6e..2b329262 100644 --- a/src/matterbridge.ts +++ b/src/matterbridge.ts @@ -470,9 +470,8 @@ export class Matterbridge { * Restarts the process by spawning a new process and exiting the current process. */ private async restartProcess() { - this.log.info('Restarting still not implemented'); + //this.log.info('Restarting still not implemented'); //return; - this.log.info('Matterbridge is restarting...'); await this.cleanup('Matterbridge is restarting...', true); this.hasCleanupStarted = false; @@ -551,8 +550,7 @@ export class Matterbridge { setTimeout(async () => { this.log.info('Cleanup completed.'); - //this.log = undefined; - if (restart) console.log(this); + //if (restart) console.log(this); if (restart) await this.initialize(); else process.exit(0); }, 2 * 1000); @@ -1372,10 +1370,15 @@ export class Matterbridge { this.log.debug('Matter server closed'); this.commissioningController = undefined; this.commissioningServer = undefined; + this.matterAggregator = undefined; this.matterServer = undefined; } - // Matterbridge version + /** + * Retrieves the latest version of a package from the npm registry. + * @param packageName - The name of the package. + * @returns A Promise that resolves to the latest version of the package. + */ private async getLatestVersion(packageName: string): Promise { return new Promise((resolve, reject) => { exec(`npm view ${packageName} version`, (error, stdout) => {