overmux 0.0.6 → 0.0.7

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="color-scheme" content="dark light" />
7
7
  <title>Overmux authentication</title>
8
- <script type="module" crossorigin src="/_overmux/auth-shell/assets/index-DabAfcs1.js"></script>
8
+ <script type="module" crossorigin src="/_overmux/auth-shell/assets/index-Bc0hP5IW.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/_overmux/auth-shell/assets/index-BM9gETvx.css">
10
10
  </head>
11
11
  <body>
package/dist/bin.js CHANGED
@@ -4343,6 +4343,19 @@ var watchTrustedFiles = async ({ configPath, onUpdate, server }) => {
4343
4343
  server.watcher.off("change", changed);
4344
4344
  };
4345
4345
  };
4346
+ var hmrHeartbeatPlugin = () => ({
4347
+ name: "overmux:hmr-heartbeat",
4348
+ apply: "serve",
4349
+ configureServer(server) {
4350
+ server.httpServer?.once("listening", () => {
4351
+ const heartbeat = setInterval(() => {
4352
+ server.ws.send("overmux:heartbeat", {});
4353
+ }, 2e4);
4354
+ heartbeat.unref();
4355
+ server.httpServer?.once("close", () => clearInterval(heartbeat));
4356
+ });
4357
+ }
4358
+ });
4346
4359
  var startManagedVite = async ({ api, configPath }) => {
4347
4360
  const { config, root } = await loadViteRoot({
4348
4361
  api,
@@ -4359,6 +4372,7 @@ var startManagedVite = async ({ api, configPath }) => {
4359
4372
  const server = await api.createServer({
4360
4373
  configFile: configPath,
4361
4374
  root,
4375
+ plugins: [hmrHeartbeatPlugin()],
4362
4376
  server: {
4363
4377
  fs: { allow: [...new Set(allowedRoots)] },
4364
4378
  hmr: { path: viteHmrPath },