next-ws 1.0.1-experimental.1 → 1.0.1-experimental.2
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/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { Server } from 'node:http';
|
|
3
3
|
import NextNodeServer from 'next/dist/server/next-server';
|
|
4
4
|
import { WebSocketServer } from 'ws';
|
|
5
|
-
export declare const CustomHttpServer
|
|
5
|
+
export declare const CustomHttpServer = "NextWS::CustomHttpServer";
|
|
6
6
|
/**
|
|
7
7
|
* Get the HTTP Server instance from the NextNodeServer.
|
|
8
8
|
* @param nextServer The NextNodeServer instance.
|
|
9
9
|
* @returns The HTTP Server instance.
|
|
10
10
|
*/
|
|
11
11
|
export declare function useHttpServer(nextServer: NextNodeServer): Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
|
12
|
-
export declare const CustomWsServer
|
|
12
|
+
export declare const CustomWsServer = "NextWS::CustomWsServer";
|
|
13
13
|
/**
|
|
14
14
|
* Create a WebSocketServer.
|
|
15
15
|
* @returns The WebSocketServer instance.
|
|
@@ -7,7 +7,7 @@ const Log = tslib_1.__importStar(require("next/dist/build/output/log"));
|
|
|
7
7
|
const next_server_1 = tslib_1.__importDefault(require("next/dist/server/next-server"));
|
|
8
8
|
const ws_1 = require("ws");
|
|
9
9
|
// =============== HTTP Server ===============
|
|
10
|
-
exports.CustomHttpServer =
|
|
10
|
+
exports.CustomHttpServer = 'NextWS::CustomHttpServer';
|
|
11
11
|
/**
|
|
12
12
|
* Get the HTTP Server instance from the NextNodeServer.
|
|
13
13
|
* @param nextServer The NextNodeServer instance.
|
|
@@ -34,7 +34,7 @@ function useHttpServer(nextServer) {
|
|
|
34
34
|
}
|
|
35
35
|
exports.useHttpServer = useHttpServer;
|
|
36
36
|
// =============== WebSocket Server ===============
|
|
37
|
-
exports.CustomWsServer =
|
|
37
|
+
exports.CustomWsServer = 'NextWS::CustomWsServer';
|
|
38
38
|
/**
|
|
39
39
|
* Create a WebSocketServer.
|
|
40
40
|
* @returns The WebSocketServer instance.
|