lianrouter 2.3.8 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +8 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ var package_default;
17
17
  var init_package = __esm(() => {
18
18
  package_default = {
19
19
  name: "lianrouter",
20
- version: "2.3.8",
20
+ version: "2.3.9",
21
21
  description: "LianRouter launcher: install, run and control the gateway from one command",
22
22
  type: "module",
23
23
  bin: {
@@ -3535,7 +3535,7 @@ async function run(argv) {
3535
3535
  case "status":
3536
3536
  return await printStatus(supervisor);
3537
3537
  case "stop":
3538
- return await stopServer(supervisor);
3538
+ return await stopServer(supervisor, runtime.installRoot);
3539
3539
  case "start":
3540
3540
  return await withShutdownHandlers(supervisor, runtime, () => runInteractive(supervisor, options, runtime), embeddedDatabase);
3541
3541
  case "tray":
@@ -3587,14 +3587,18 @@ async function printStatus(supervisor) {
3587
3587
  await supervisor.dispose();
3588
3588
  return 0;
3589
3589
  }
3590
- async function stopServer(supervisor) {
3590
+ async function stopServer(supervisor, installRoot) {
3591
+ const trayWasRunning = await isTrayRunning(installRoot);
3592
+ if (trayWasRunning) {
3593
+ await stopTray(installRoot);
3594
+ }
3591
3595
  const adopted = await supervisor.adoptExisting();
3592
3596
  if (!adopted) {
3593
3597
  console.log("LianRouter is not running.");
3594
3598
  return 0;
3595
3599
  }
3596
3600
  const status = await supervisor.stop();
3597
- console.log(status.state === "stopped" ? "LianRouter stopped." : `Stop failed: ${status.lastError ?? status.state}`);
3601
+ console.log(status.state === "stopped" ? `LianRouter stopped${trayWasRunning ? " (tray closed)" : ""}.` : `Stop failed: ${status.lastError ?? status.state}`);
3598
3602
  await supervisor.dispose();
3599
3603
  return 0;
3600
3604
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lianrouter",
3
- "version": "2.3.8",
3
+ "version": "2.3.9",
4
4
  "description": "LianRouter launcher: install, run and control the gateway from one command",
5
5
  "type": "module",
6
6
  "bin": {