stoat.run 0.1.0 → 0.1.1
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.
- package/dist/bin.cjs +9 -1
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -613,6 +613,7 @@ async function httpCommand(port, options) {
|
|
|
613
613
|
pid: process.pid,
|
|
614
614
|
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
615
615
|
});
|
|
616
|
+
let interactive = null;
|
|
616
617
|
const tunnel = new TunnelClient({
|
|
617
618
|
edgeUrl,
|
|
618
619
|
slug,
|
|
@@ -625,9 +626,16 @@ async function httpCommand(port, options) {
|
|
|
625
626
|
if (payload.reason === "session_expired") {
|
|
626
627
|
clearSession();
|
|
627
628
|
}
|
|
629
|
+
if (payload.reason === "closed_by_overlay") {
|
|
630
|
+
process.stdout.write(" Tunnel closed from overlay\n");
|
|
631
|
+
tunnel.stop();
|
|
632
|
+
clearSession();
|
|
633
|
+
interactive?.stop();
|
|
634
|
+
process.exit(0);
|
|
635
|
+
}
|
|
628
636
|
}
|
|
629
637
|
});
|
|
630
|
-
|
|
638
|
+
interactive = new InteractiveMode({
|
|
631
639
|
publicUrl,
|
|
632
640
|
tunnel,
|
|
633
641
|
onQuit: () => {
|