@officexapp/catalogs-cli 0.2.4 → 0.2.6
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/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -900,8 +900,8 @@ function buildPreviewHtml(schema, port) {
|
|
|
900
900
|
<script id="__catalog_data" type="application/json">${schemaJson}</script>
|
|
901
901
|
|
|
902
902
|
<script type="module">
|
|
903
|
-
import React from 'https://esm.sh/react@18
|
|
904
|
-
import ReactDOM from 'https://esm.sh/react-dom@18/client
|
|
903
|
+
import React from 'https://esm.sh/react@18';
|
|
904
|
+
import ReactDOM from 'https://esm.sh/react-dom@18/client';
|
|
905
905
|
|
|
906
906
|
const h = React.createElement;
|
|
907
907
|
const schema = JSON.parse(document.getElementById('__catalog_data').textContent);
|
|
@@ -1544,7 +1544,10 @@ function buildPreviewHtml(schema, port) {
|
|
|
1544
1544
|
|
|
1545
1545
|
// --- Auto-reload via SSE ---
|
|
1546
1546
|
const evtSource = new EventSource('/__dev_sse');
|
|
1547
|
-
evtSource.onmessage = () =>
|
|
1547
|
+
evtSource.onmessage = (e) => {
|
|
1548
|
+
if (e.data === 'connected') return; // ignore initial handshake
|
|
1549
|
+
window.location.reload();
|
|
1550
|
+
};
|
|
1548
1551
|
evtSource.onerror = () => {};
|
|
1549
1552
|
|
|
1550
1553
|
// --- Mount ---
|