rechrome 1.23.2 → 1.23.3

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 (3) hide show
  1. package/package.json +1 -1
  2. package/rech.js +5 -1
  3. package/rech.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rechrome",
3
- "version": "1.23.2",
3
+ "version": "1.23.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/snomiao/rechrome.git"
package/rech.js CHANGED
@@ -1593,8 +1593,12 @@ async function status(): Promise<void> {
1593
1593
  const bind = pingBody?.bind;
1594
1594
  const listenAddr = bind ? `${bind}:${port}` : `${host}:${port}`;
1595
1595
  console.log(`serve: ${ping ? `running ${protocol}://${listenAddr}` : "not running"}`);
1596
+ // daemonManager().id — there is no PM_BIN constant. Referencing one threw a
1597
+ // ReferenceError that took down the whole of `rech status`, so the one command
1598
+ // that reports "the relay is wedged" died exactly when the relay was wedged,
1599
+ // printing a stack trace instead of the restart hint.
1596
1600
  if (pingBody?.degraded)
1597
- console.log(`relay: ⚠ degraded (${pingBody.consecutiveTimeouts} consecutive command timeouts) — if it persists, the daemon self-restarts; force it now with \`${PM_BIN} restart ${PM_PROCESS_NAME}\``);
1601
+ console.log(`relay: ⚠ degraded (${pingBody.consecutiveTimeouts} consecutive command timeouts) — if it persists, the daemon self-restarts; force it now with \`${daemonManager().id} restart ${PM_PROCESS_NAME}\``);
1598
1602
  const pmOut = await pmList();
1599
1603
  const daemonRegistered = pmOut.includes(PM_PROCESS_NAME);
1600
1604
  console.log(`daemon: ${daemonRegistered ? `${daemonManager().id} (${PM_PROCESS_NAME})` : "not installed"}`);
package/rech.ts CHANGED
@@ -1593,8 +1593,12 @@ async function status(): Promise<void> {
1593
1593
  const bind = pingBody?.bind;
1594
1594
  const listenAddr = bind ? `${bind}:${port}` : `${host}:${port}`;
1595
1595
  console.log(`serve: ${ping ? `running ${protocol}://${listenAddr}` : "not running"}`);
1596
+ // daemonManager().id — there is no PM_BIN constant. Referencing one threw a
1597
+ // ReferenceError that took down the whole of `rech status`, so the one command
1598
+ // that reports "the relay is wedged" died exactly when the relay was wedged,
1599
+ // printing a stack trace instead of the restart hint.
1596
1600
  if (pingBody?.degraded)
1597
- console.log(`relay: ⚠ degraded (${pingBody.consecutiveTimeouts} consecutive command timeouts) — if it persists, the daemon self-restarts; force it now with \`${PM_BIN} restart ${PM_PROCESS_NAME}\``);
1601
+ console.log(`relay: ⚠ degraded (${pingBody.consecutiveTimeouts} consecutive command timeouts) — if it persists, the daemon self-restarts; force it now with \`${daemonManager().id} restart ${PM_PROCESS_NAME}\``);
1598
1602
  const pmOut = await pmList();
1599
1603
  const daemonRegistered = pmOut.includes(PM_PROCESS_NAME);
1600
1604
  console.log(`daemon: ${daemonRegistered ? `${daemonManager().id} (${PM_PROCESS_NAME})` : "not installed"}`);