mikser-io-live 6.0.0 → 6.1.0

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/README.md +9 -2
  2. package/index.js +4 -1
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -25,11 +25,11 @@ export default {
25
25
  mikser --server --watch
26
26
  ```
27
27
 
28
- That's the whole setup. `--watch` rebuilds on change, `--server` serves the output, and this plugin connects the two to the browser.
28
+ That's the whole setup. `--watch` rebuilds on change, `--server` serves the output, and this plugin connects the two to the browser. mikser prints every address it answers on, so testing against a phone is a matter of typing the LAN one it gives you.
29
29
 
30
30
  | option | default | |
31
31
  | --- | --- | --- |
32
- | `path` | `/__mikser_live` | where the event stream is mounted |
32
+ | `path` | `/live` | where the event stream is mounted |
33
33
 
34
34
  ## What it does
35
35
 
@@ -49,6 +49,13 @@ There is no second server and no second port. Without a shared Express app there
49
49
 
50
50
  This is a change from 5.x, which wrapped [alive-server](https://www.npmjs.com/package/alive-server) and ran its own server on its own port. If you were using it as the lighter alternative to `mikser --server`, you now want `mikser --server --watch` instead — one port, one process, and it composes with every other plugin that mounts on the same app.
51
51
 
52
+ ## Where it mounts
53
+
54
+ `/live`, and `path` moves it. That is the same shape every other mikser plugin
55
+ uses — `/api`, `/auth`, `/mcp`, `/preview`, `/drive`, `/forms`, `/vector` —
56
+ so if a page of yours needs that path, move this one the way you would move
57
+ any of those.
58
+
52
59
  ## How the page gets the script
53
60
 
54
61
  A small snippet is injected before `</body>`, falling back to `</svg>` then `</head>` — the same order [alive-server](https://www.npmjs.com/package/alive-server) uses, and right for the same reasons: a standalone SVG served as a page has no body, and some documents have no closing body tag at all. A page with none of the three is warned about once, because a page that silently never reloads looks exactly like a reload that is broken.
package/index.js CHANGED
@@ -59,7 +59,10 @@ export function injectInto(html, script) {
59
59
  }
60
60
 
61
61
  export function live(options = {}) {
62
- const streamPath = options.path ?? '/__mikser_live'
62
+ // `/live`, overridable — the same shape every other plugin mounts with:
63
+ // api at /api, auth at /auth, mcp at /mcp, preview at /preview. Eight of
64
+ // them, one pattern, and no reason for a ninth.
65
+ const streamPath = options.path ?? '/live'
63
66
  // Changes every start. A client that reconnects and sees a different one
64
67
  // knows mikser restarted — new code, possibly a different site — and
65
68
  // reloads rather than trusting a page the previous process rendered.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikser-io-live",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Live reload for mikser-io, mounted on mikser's own HTTP server. Reloads from the build report rather than by watching files, so a CSS edit swaps the stylesheet in place and a build that touched other pages does not interrupt the one you are looking at.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,6 +18,6 @@
18
18
  },
19
19
  "homepage": "https://github.com/almero-digital-marketing/mikser-io-live#readme",
20
20
  "peerDependencies": {
21
- "mikser-io": "^9.62.0"
21
+ "mikser-io": "^9.64.0"
22
22
  }
23
23
  }