@nitronjs/framework 0.2.4 → 0.2.5
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/cli/njs.js
CHANGED
package/lib/Console/Output.js
CHANGED
package/lib/HMR/Server.js
CHANGED
|
@@ -52,11 +52,12 @@ class HMRServer {
|
|
|
52
52
|
|
|
53
53
|
this.#io = new SocketServer(httpServer, {
|
|
54
54
|
path: "/__nitron_hmr",
|
|
55
|
-
transports: ["websocket"
|
|
55
|
+
transports: ["websocket"],
|
|
56
56
|
cors: { origin: "*" },
|
|
57
57
|
pingTimeout: 60000,
|
|
58
58
|
pingInterval: 25000,
|
|
59
|
-
serveClient: false
|
|
59
|
+
serveClient: false,
|
|
60
|
+
allowEIO3: true
|
|
60
61
|
});
|
|
61
62
|
|
|
62
63
|
this.#io.on("connection", (socket) => {
|
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
try {
|
|
22
22
|
socket = io({
|
|
23
23
|
path: "/__nitron_hmr",
|
|
24
|
-
transports: ["websocket"
|
|
25
|
-
reconnection: true
|
|
24
|
+
transports: ["websocket"],
|
|
25
|
+
reconnection: true,
|
|
26
|
+
reconnectionAttempts: 5,
|
|
27
|
+
reconnectionDelay: 1000,
|
|
28
|
+
timeout: 5000
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
catch (e) {
|
|
@@ -38,6 +41,10 @@
|
|
|
38
41
|
window.__nitron_hmr_connected__ = false;
|
|
39
42
|
});
|
|
40
43
|
|
|
44
|
+
socket.on("connect_error", function() {
|
|
45
|
+
window.__nitron_hmr_connected__ = false;
|
|
46
|
+
});
|
|
47
|
+
|
|
41
48
|
socket.on("hmr:update", function() {
|
|
42
49
|
refetchPage();
|
|
43
50
|
});
|
|
@@ -198,5 +205,5 @@
|
|
|
198
205
|
else {
|
|
199
206
|
connect();
|
|
200
207
|
}
|
|
201
|
-
|
|
208
|
+
|
|
202
209
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitronjs/framework",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "NitronJS is a modern and extensible Node.js MVC framework built on Fastify. It focuses on clean architecture, modular structure, and developer productivity, offering built-in routing, middleware, configuration management, CLI tooling, and native React integration for scalable full-stack applications.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"njs": "./cli/njs.js"
|