@sanctumterra/raknet 1.3.79 → 1.4.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.
- package/README.md +1 -1
- package/dist/client/client.d.ts +19 -24
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +135 -278
- package/dist/client/index.d.ts +1 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/types/client-events.d.ts +8 -0
- package/dist/client/types/client-events.d.ts.map +1 -0
- package/dist/client/types/client-options.d.ts +12 -0
- package/dist/client/types/client-options.d.ts.map +1 -0
- package/dist/client/types/client-options.js +14 -0
- package/dist/client/types/index.d.ts +3 -0
- package/dist/client/types/index.d.ts.map +1 -0
- package/dist/{proto/decorators → client/types}/index.js +2 -2
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/server/connection.d.ts +20 -59
- package/dist/server/connection.d.ts.map +1 -1
- package/dist/server/connection.js +53 -365
- package/dist/server/index.d.ts +2 -3
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -3
- package/dist/server/server.d.ts +11 -18
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +98 -137
- package/dist/{proto → server}/types/advertisement.d.ts +1 -1
- package/dist/server/types/advertisement.d.ts.map +1 -0
- package/dist/{proto → server}/types/advertisement.js +14 -10
- package/dist/server/types/connection-events.d.ts +4 -0
- package/dist/server/types/connection-events.d.ts.map +1 -0
- package/dist/server/types/index.d.ts +5 -0
- package/dist/server/types/index.d.ts.map +1 -0
- package/dist/{proto → server}/types/index.js +3 -1
- package/dist/server/types/server-events.d.ts +7 -0
- package/dist/server/types/server-events.d.ts.map +1 -0
- package/dist/server/types/server-options.d.ts +12 -0
- package/dist/server/types/server-options.d.ts.map +1 -0
- package/dist/server/types/server-options.js +14 -0
- package/dist/shared/emitter.d.ts +28 -0
- package/dist/shared/emitter.d.ts.map +1 -0
- package/dist/shared/emitter.js +71 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/{utils → shared}/index.js +4 -1
- package/dist/{utils/Logger.d.ts → shared/logger.d.ts} +1 -1
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/network_session.d.ts +34 -0
- package/dist/shared/network_session.d.ts.map +1 -0
- package/dist/shared/network_session.js +247 -0
- package/dist/shared/proto/enums/connectionStatus.d.ts +8 -0
- package/dist/shared/proto/enums/connectionStatus.d.ts.map +1 -0
- package/dist/shared/proto/enums/connectionStatus.js +11 -0
- package/dist/shared/proto/enums/index.d.ts +5 -0
- package/dist/shared/proto/enums/index.d.ts.map +1 -0
- package/dist/{proto → shared/proto}/enums/index.js +2 -3
- package/dist/shared/proto/enums/packets.d.ts +19 -0
- package/dist/shared/proto/enums/packets.d.ts.map +1 -0
- package/dist/shared/proto/enums/packets.js +23 -0
- package/dist/shared/proto/enums/priority.d.ts +6 -0
- package/dist/shared/proto/enums/priority.d.ts.map +1 -0
- package/dist/shared/proto/enums/priority.js +4 -0
- package/dist/shared/proto/enums/reliability.d.ts.map +1 -0
- package/dist/shared/proto/index.d.ts +5 -0
- package/dist/shared/proto/index.d.ts.map +1 -0
- package/dist/{proto → shared/proto}/index.js +3 -3
- package/dist/shared/proto/offline/index.d.ts +7 -0
- package/dist/shared/proto/offline/index.d.ts.map +1 -0
- package/dist/shared/proto/offline/index.js +22 -0
- package/dist/shared/proto/offline/open-connection-reply-one.d.ts +9 -0
- package/dist/shared/proto/offline/open-connection-reply-one.d.ts.map +1 -0
- package/dist/shared/proto/offline/open-connection-reply-one.js +28 -0
- package/dist/shared/proto/offline/open-connection-reply-two.d.ts +11 -0
- package/dist/shared/proto/offline/open-connection-reply-two.d.ts.map +1 -0
- package/dist/shared/proto/offline/open-connection-reply-two.js +31 -0
- package/dist/shared/proto/offline/open-connection-request-one.d.ts +8 -0
- package/dist/shared/proto/offline/open-connection-request-one.d.ts.map +1 -0
- package/dist/shared/proto/offline/open-connection-request-one.js +25 -0
- package/dist/shared/proto/offline/open-connection-request-two.d.ts +10 -0
- package/dist/shared/proto/offline/open-connection-request-two.d.ts.map +1 -0
- package/dist/shared/proto/offline/open-connection-request-two.js +28 -0
- package/dist/shared/proto/offline/unconnected-ping.d.ts +8 -0
- package/dist/shared/proto/offline/unconnected-ping.d.ts.map +1 -0
- package/dist/shared/proto/offline/unconnected-ping.js +25 -0
- package/dist/shared/proto/offline/unconnected-pong.d.ts +9 -0
- package/dist/shared/proto/offline/unconnected-pong.d.ts.map +1 -0
- package/dist/shared/proto/offline/unconnected-pong.js +28 -0
- package/dist/shared/proto/online/ack.d.ts +7 -0
- package/dist/shared/proto/online/ack.d.ts.map +1 -0
- package/dist/{proto/packets → shared/proto/online}/ack.js +16 -31
- package/dist/shared/proto/online/connected-ping.d.ts +7 -0
- package/dist/shared/proto/online/connected-ping.d.ts.map +1 -0
- package/dist/shared/proto/online/connected-ping.js +19 -0
- package/dist/shared/proto/online/connected-pong.d.ts +8 -0
- package/dist/shared/proto/online/connected-pong.d.ts.map +1 -0
- package/dist/shared/proto/online/connected-pong.js +22 -0
- package/dist/shared/proto/online/connection-request-accepted.d.ts +12 -0
- package/dist/shared/proto/online/connection-request-accepted.d.ts.map +1 -0
- package/dist/shared/proto/online/connection-request-accepted.js +37 -0
- package/dist/shared/proto/online/connection-request.d.ts +9 -0
- package/dist/shared/proto/online/connection-request.d.ts.map +1 -0
- package/dist/shared/proto/online/connection-request.js +25 -0
- package/dist/shared/proto/online/disconnect-message.d.ts +6 -0
- package/dist/shared/proto/online/disconnect-message.d.ts.map +1 -0
- package/dist/shared/proto/online/disconnect-message.js +15 -0
- package/dist/shared/proto/online/frame-set.d.ts +9 -0
- package/dist/shared/proto/online/frame-set.d.ts.map +1 -0
- package/dist/shared/proto/online/frame-set.js +23 -0
- package/dist/shared/proto/online/index.d.ts +9 -0
- package/dist/shared/proto/online/index.d.ts.map +1 -0
- package/dist/shared/proto/online/index.js +24 -0
- package/dist/shared/proto/online/new-incomming-connection.d.ts +11 -0
- package/dist/shared/proto/online/new-incomming-connection.d.ts.map +1 -0
- package/dist/shared/proto/online/new-incomming-connection.js +33 -0
- package/dist/shared/proto/types/address.d.ts +12 -0
- package/dist/shared/proto/types/address.d.ts.map +1 -0
- package/dist/shared/proto/types/address.js +61 -0
- package/dist/shared/proto/types/frame.d.ts +23 -0
- package/dist/shared/proto/types/frame.d.ts.map +1 -0
- package/dist/shared/proto/types/frame.js +119 -0
- package/dist/{proto/packets → shared/proto}/types/index.d.ts +0 -2
- package/dist/shared/proto/types/index.d.ts.map +1 -0
- package/dist/{proto/packets → shared/proto}/types/index.js +0 -2
- package/dist/shared/proto/types/magic.d.ts +7 -0
- package/dist/shared/proto/types/magic.d.ts.map +1 -0
- package/dist/shared/proto/types/magic.js +15 -0
- package/dist/shared/proto/types/mtu.d.ts +7 -0
- package/dist/shared/proto/types/mtu.d.ts.map +1 -0
- package/dist/shared/proto/types/mtu.js +13 -0
- package/dist/tests/client-connect.d.ts +2 -0
- package/dist/tests/client-connect.d.ts.map +1 -0
- package/dist/tests/client-connect.js +32 -0
- package/dist/tests/client-once.d.ts +2 -0
- package/dist/tests/client-once.d.ts.map +1 -0
- package/dist/tests/client-once.js +11 -0
- package/dist/tests/server-listen.d.ts +2 -0
- package/dist/tests/server-listen.d.ts.map +1 -0
- package/dist/tests/server-listen.js +5 -0
- package/package.json +8 -8
- package/bun.lock +0 -67
- package/dist/client/client-events.d.ts +0 -23
- package/dist/client/client-events.d.ts.map +0 -1
- package/dist/client/client-options.d.ts +0 -13
- package/dist/client/client-options.d.ts.map +0 -1
- package/dist/client/client-options.js +0 -14
- package/dist/client/client_options.d.ts +0 -10
- package/dist/client/client_options.d.ts.map +0 -1
- package/dist/client/client_options.js +0 -11
- package/dist/client/framer.d.ts +0 -56
- package/dist/client/framer.d.ts.map +0 -1
- package/dist/client/framer.js +0 -467
- package/dist/proto/decorators/create.d.ts +0 -8
- package/dist/proto/decorators/create.d.ts.map +0 -1
- package/dist/proto/decorators/create.js +0 -77
- package/dist/proto/decorators/index.d.ts +0 -3
- package/dist/proto/decorators/index.d.ts.map +0 -1
- package/dist/proto/decorators/serialize.d.ts +0 -4
- package/dist/proto/decorators/serialize.d.ts.map +0 -1
- package/dist/proto/decorators/serialize.js +0 -12
- package/dist/proto/enums/flags.d.ts +0 -7
- package/dist/proto/enums/flags.d.ts.map +0 -1
- package/dist/proto/enums/flags.js +0 -10
- package/dist/proto/enums/index.d.ts +0 -6
- package/dist/proto/enums/index.d.ts.map +0 -1
- package/dist/proto/enums/packet.d.ts +0 -122
- package/dist/proto/enums/packet.d.ts.map +0 -1
- package/dist/proto/enums/packet.js +0 -125
- package/dist/proto/enums/priority.d.ts +0 -5
- package/dist/proto/enums/priority.d.ts.map +0 -1
- package/dist/proto/enums/priority.js +0 -8
- package/dist/proto/enums/reliability.d.ts.map +0 -1
- package/dist/proto/enums/status.d.ts +0 -7
- package/dist/proto/enums/status.d.ts.map +0 -1
- package/dist/proto/enums/status.js +0 -10
- package/dist/proto/index.d.ts +0 -5
- package/dist/proto/index.d.ts.map +0 -1
- package/dist/proto/packets/ack.d.ts +0 -10
- package/dist/proto/packets/ack.d.ts.map +0 -1
- package/dist/proto/packets/base-packet.d.ts +0 -26
- package/dist/proto/packets/base-packet.d.ts.map +0 -1
- package/dist/proto/packets/base-packet.js +0 -37
- package/dist/proto/packets/connected-ping.d.ts +0 -5
- package/dist/proto/packets/connected-ping.d.ts.map +0 -1
- package/dist/proto/packets/connected-ping.js +0 -27
- package/dist/proto/packets/connected-pong.d.ts +0 -6
- package/dist/proto/packets/connected-pong.d.ts.map +0 -1
- package/dist/proto/packets/connected-pong.js +0 -32
- package/dist/proto/packets/connection-request-accepted.d.ts +0 -10
- package/dist/proto/packets/connection-request-accepted.d.ts.map +0 -1
- package/dist/proto/packets/connection-request-accepted.js +0 -48
- package/dist/proto/packets/connection-request.d.ts +0 -7
- package/dist/proto/packets/connection-request.d.ts.map +0 -1
- package/dist/proto/packets/connection-request.js +0 -37
- package/dist/proto/packets/disconnect.d.ts +0 -5
- package/dist/proto/packets/disconnect.d.ts.map +0 -1
- package/dist/proto/packets/disconnect.js +0 -17
- package/dist/proto/packets/frame.d.ts +0 -1
- package/dist/proto/packets/frame.d.ts.map +0 -1
- package/dist/proto/packets/frame.js +0 -1
- package/dist/proto/packets/frameset.d.ts +0 -11
- package/dist/proto/packets/frameset.d.ts.map +0 -1
- package/dist/proto/packets/frameset.js +0 -37
- package/dist/proto/packets/incompatible-protocol-version.d.ts +0 -8
- package/dist/proto/packets/incompatible-protocol-version.d.ts.map +0 -1
- package/dist/proto/packets/incompatible-protocol-version.js +0 -38
- package/dist/proto/packets/index.d.ts +0 -19
- package/dist/proto/packets/index.d.ts.map +0 -1
- package/dist/proto/packets/index.js +0 -34
- package/dist/proto/packets/nack.d.ts +0 -8
- package/dist/proto/packets/nack.d.ts.map +0 -1
- package/dist/proto/packets/nack.js +0 -88
- package/dist/proto/packets/new-incoming-connection.d.ts +0 -9
- package/dist/proto/packets/new-incoming-connection.d.ts.map +0 -1
- package/dist/proto/packets/new-incoming-connection.js +0 -43
- package/dist/proto/packets/open-connection-reply-one.d.ts +0 -8
- package/dist/proto/packets/open-connection-reply-one.d.ts.map +0 -1
- package/dist/proto/packets/open-connection-reply-one.js +0 -43
- package/dist/proto/packets/open-connection-reply-two.d.ts +0 -10
- package/dist/proto/packets/open-connection-reply-two.d.ts.map +0 -1
- package/dist/proto/packets/open-connection-reply-two.js +0 -48
- package/dist/proto/packets/open-connection-request-one.d.ts +0 -7
- package/dist/proto/packets/open-connection-request-one.d.ts.map +0 -1
- package/dist/proto/packets/open-connection-request-one.js +0 -38
- package/dist/proto/packets/open-connection-request-two.d.ts +0 -9
- package/dist/proto/packets/open-connection-request-two.d.ts.map +0 -1
- package/dist/proto/packets/open-connection-request-two.js +0 -43
- package/dist/proto/packets/types/address.d.ts +0 -48
- package/dist/proto/packets/types/address.d.ts.map +0 -1
- package/dist/proto/packets/types/address.js +0 -99
- package/dist/proto/packets/types/data-type.d.ts +0 -21
- package/dist/proto/packets/types/data-type.d.ts.map +0 -1
- package/dist/proto/packets/types/data-type.js +0 -29
- package/dist/proto/packets/types/frame.d.ts +0 -23
- package/dist/proto/packets/types/frame.d.ts.map +0 -1
- package/dist/proto/packets/types/frame.js +0 -94
- package/dist/proto/packets/types/index.d.ts.map +0 -1
- package/dist/proto/packets/types/magic.d.ts +0 -7
- package/dist/proto/packets/types/magic.d.ts.map +0 -1
- package/dist/proto/packets/types/magic.js +0 -14
- package/dist/proto/packets/types/mtu.d.ts +0 -9
- package/dist/proto/packets/types/mtu.d.ts.map +0 -1
- package/dist/proto/packets/types/mtu.js +0 -18
- package/dist/proto/packets/types/sys-address.d.ts +0 -11
- package/dist/proto/packets/types/sys-address.d.ts.map +0 -1
- package/dist/proto/packets/types/sys-address.js +0 -32
- package/dist/proto/packets/unconnected-ping.d.ts +0 -7
- package/dist/proto/packets/unconnected-ping.d.ts.map +0 -1
- package/dist/proto/packets/unconnected-ping.js +0 -38
- package/dist/proto/packets/unconnected-pong.d.ts +0 -8
- package/dist/proto/packets/unconnected-pong.d.ts.map +0 -1
- package/dist/proto/packets/unconnected-pong.js +0 -43
- package/dist/proto/types/advertisement.d.ts.map +0 -1
- package/dist/proto/types/index.d.ts +0 -3
- package/dist/proto/types/index.d.ts.map +0 -1
- package/dist/proto/types/valid.d.ts +0 -4
- package/dist/proto/types/valid.d.ts.map +0 -1
- package/dist/server/server-events.d.ts +0 -9
- package/dist/server/server-events.d.ts.map +0 -1
- package/dist/server/server-options.d.ts +0 -26
- package/dist/server/server-options.d.ts.map +0 -1
- package/dist/server/server-options.js +0 -20
- package/dist/tests/client.d.ts +0 -2
- package/dist/tests/client.d.ts.map +0 -1
- package/dist/tests/client.js +0 -15
- package/dist/tests/localhost.d.ts +0 -2
- package/dist/tests/localhost.d.ts.map +0 -1
- package/dist/tests/localhost.js +0 -34
- package/dist/tests/server.d.ts +0 -2
- package/dist/tests/server.d.ts.map +0 -1
- package/dist/tests/server.js +0 -32
- package/dist/tests/test.d.ts +0 -2
- package/dist/tests/test.d.ts.map +0 -1
- package/dist/tests/test.js +0 -49
- package/dist/utils/Logger.d.ts.map +0 -1
- package/dist/utils/decorators.d.ts +0 -2
- package/dist/utils/decorators.d.ts.map +0 -1
- package/dist/utils/decorators.js +0 -17
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
- /package/dist/client/{client-events.js → types/client-events.js} +0 -0
- /package/dist/{proto/types/valid.js → server/types/connection-events.js} +0 -0
- /package/dist/server/{server-events.js → types/server-events.js} +0 -0
- /package/dist/{utils/Logger.js → shared/logger.js} +0 -0
- /package/dist/{proto → shared/proto}/enums/reliability.d.ts +0 -0
- /package/dist/{proto → shared/proto}/enums/reliability.js +0 -0
package/README.md
CHANGED
package/dist/client/client.d.ts
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ClientEvents } from "./
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { type ClientOptions } from "./client-options";
|
|
7
|
-
export declare class Client extends Emitter<ClientEvents> {
|
|
8
|
-
socket: Socket | null;
|
|
9
|
-
framer: Framer | null;
|
|
1
|
+
import { EventEmitter, Priority, type Frame } from "../shared";
|
|
2
|
+
import type { ClientEvents } from "./types";
|
|
3
|
+
import { type ClientOptions } from "./types/client-options";
|
|
4
|
+
import { type RemoteInfo } from "node:dgram";
|
|
5
|
+
export declare class Client extends EventEmitter<ClientEvents> {
|
|
10
6
|
options: ClientOptions;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
private socket;
|
|
8
|
+
private interval;
|
|
9
|
+
private status;
|
|
10
|
+
tick: number;
|
|
11
|
+
private session;
|
|
16
12
|
constructor(options?: Partial<ClientOptions>);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disconnect(): Promise<void>;
|
|
13
|
+
connect(): Promise<void>;
|
|
14
|
+
onTick(): void;
|
|
15
|
+
onMessage(data: Buffer, rinfo: RemoteInfo): void;
|
|
16
|
+
handleOnline(data: Buffer): void;
|
|
17
|
+
sendFrame(frame: Frame, priority?: Priority): void;
|
|
18
|
+
frameAndSend(data: Buffer, priority?: Priority): void;
|
|
19
|
+
ping(): void;
|
|
20
|
+
send(data: Buffer): void;
|
|
21
|
+
disconnect(): void;
|
|
27
22
|
}
|
|
28
23
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,YAAY,EAWZ,QAAQ,EAIR,KAAK,KAAK,EAIV,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EACN,KAAK,aAAa,EAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAgB,KAAK,UAAU,EAAe,MAAM,YAAY,CAAC;AAGxE,qBAAa,MAAO,SAAQ,YAAY,CAAC,YAAY,CAAC;IAC9C,OAAO,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,MAAM,CAAmB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,OAAO,CAAiB;gBAEpB,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM;IAmBzC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBxB,MAAM,IAAI,IAAI;IAYd,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAqDhD,YAAY,CAAC,IAAI,EAAE,MAAM;IAwCzB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAE,QAA0B;IAI5D,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,QAA0B;IAI/D,IAAI,IAAI,IAAI;IAQZ,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxB,UAAU,IAAI,IAAI;CAIzB"}
|
package/dist/client/client.js
CHANGED
|
@@ -1,308 +1,165 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Client = void 0;
|
|
7
|
-
const
|
|
4
|
+
const shared_1 = require("../shared");
|
|
5
|
+
const client_options_1 = require("./types/client-options");
|
|
8
6
|
const node_dgram_1 = require("node:dgram");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const disconnect_1 = __importDefault(require("../proto/packets/disconnect"));
|
|
12
|
-
const client_options_1 = require("./client-options");
|
|
13
|
-
const utils_1 = require("../utils");
|
|
14
|
-
const TICK_INTERVAL = 50;
|
|
15
|
-
const REQUEST_INTERVAL = 500;
|
|
16
|
-
class Client extends emitter_1.Emitter {
|
|
17
|
-
socket;
|
|
18
|
-
framer;
|
|
7
|
+
const shared_2 = require("../shared");
|
|
8
|
+
class Client extends shared_1.EventEmitter {
|
|
19
9
|
options;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
constructor(options =
|
|
10
|
+
socket;
|
|
11
|
+
interval;
|
|
12
|
+
status;
|
|
13
|
+
tick;
|
|
14
|
+
session;
|
|
15
|
+
constructor(options = {}) {
|
|
26
16
|
super();
|
|
27
17
|
this.options = { ...client_options_1.defaultClientOptions, ...options };
|
|
28
|
-
this.
|
|
18
|
+
this.status = shared_1.ConnectionStatus.Disconnected;
|
|
19
|
+
this.tick = 0;
|
|
20
|
+
this.socket = (0, node_dgram_1.createSocket)("udp4");
|
|
21
|
+
this.socket.bind();
|
|
22
|
+
this.interval = setInterval(this.onTick.bind(this), 1000 / this.options.tickRate);
|
|
23
|
+
this.socket.on("message", this.onMessage.bind(this));
|
|
24
|
+
this.session = new shared_1.NetworkSession(this.options.mtu);
|
|
25
|
+
this.session.send = this.send.bind(this);
|
|
26
|
+
this.session.handle = (data) => {
|
|
27
|
+
this.handleOnline(data);
|
|
28
|
+
};
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
this.socket = (0, node_dgram_1.createSocket)("udp4");
|
|
33
|
-
this.framer = new framer_1.Framer(this);
|
|
34
|
-
this.remove("tick", () => this.framer?.tick());
|
|
35
|
-
this.on("tick", () => this.framer?.tick());
|
|
36
|
-
this.socket.removeAllListeners();
|
|
37
|
-
this.socket.on("message", (payload, rinfo) => {
|
|
38
|
-
this.framer?.incomingMessage(payload, rinfo);
|
|
39
|
-
});
|
|
40
|
-
this.socket.on("error", (err) => {
|
|
41
|
-
utils_1.Logger.error(`[Client] Socket error: ${err}`);
|
|
42
|
-
});
|
|
43
|
-
utils_1.Logger.disabled = this.options.loggerDisabled;
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
utils_1.Logger.error(`Failed to create socket: ${error}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
async ping() {
|
|
30
|
+
connect() {
|
|
50
31
|
return new Promise((resolve, reject) => {
|
|
32
|
+
this.status = shared_1.ConnectionStatus.Connecting;
|
|
33
|
+
const request = new shared_1.OpenConnectionRequestOne();
|
|
34
|
+
request.mtu = this.options.mtu;
|
|
35
|
+
request.protocol = 11; // Only 11 is supported
|
|
36
|
+
const serialized = request.serialize();
|
|
37
|
+
this.send(serialized);
|
|
51
38
|
const timeout = setTimeout(() => {
|
|
52
|
-
reject(new Error("
|
|
39
|
+
reject(new Error("Connection timed out"));
|
|
53
40
|
}, this.options.timeout);
|
|
54
|
-
this.once("
|
|
41
|
+
this.once("connect", () => {
|
|
55
42
|
clearTimeout(timeout);
|
|
56
|
-
resolve(
|
|
43
|
+
resolve();
|
|
57
44
|
});
|
|
58
|
-
const unconnectedPing = new proto_1.UnconnectedPing();
|
|
59
|
-
unconnectedPing.guid = this.options.clientId;
|
|
60
|
-
unconnectedPing.clientTimestamp = BigInt(Date.now());
|
|
61
|
-
this.send(unconnectedPing.serialize());
|
|
62
45
|
});
|
|
63
46
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
this.
|
|
74
|
-
try {
|
|
75
|
-
const advertisement = await this.ping();
|
|
76
|
-
if (!advertisement)
|
|
77
|
-
throw new Error("Failed to get server advertisement");
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
let isResolved = false;
|
|
80
|
-
let currentStage = "request-one"; // Track connection stage
|
|
81
|
-
const cleanup = () => {
|
|
82
|
-
if (this.connectionTimeout) {
|
|
83
|
-
clearTimeout(this.connectionTimeout);
|
|
84
|
-
this.connectionTimeout = undefined;
|
|
85
|
-
}
|
|
86
|
-
if (this.requestInterval) {
|
|
87
|
-
clearInterval(this.requestInterval);
|
|
88
|
-
this.requestInterval = undefined;
|
|
89
|
-
}
|
|
90
|
-
if (!isResolved) {
|
|
91
|
-
utils_1.Logger.error("Could not resolve connection.");
|
|
92
|
-
this.cleanup();
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
// Setup connection timeout
|
|
96
|
-
this.connectionTimeout = setTimeout(() => {
|
|
97
|
-
cleanup();
|
|
98
|
-
reject(new Error("Connection timed out"));
|
|
99
|
-
}, this.options.timeout);
|
|
100
|
-
// Prepare connection request one
|
|
101
|
-
const requestOne = new proto_1.OpenConnectionRequestOne();
|
|
102
|
-
requestOne.mtu = this.options.mtuSize;
|
|
103
|
-
requestOne.protocol = this.options.protocolVersion;
|
|
104
|
-
// Handle open-connection-reply-one event
|
|
105
|
-
this.once("open-connection-reply-one", () => {
|
|
106
|
-
currentStage = "request-two";
|
|
107
|
-
utils_1.Logger.debug("[Client] Received OpenConnectionReplyOne, sending OpenConnectionRequestTwo");
|
|
108
|
-
// Move to next connection stage
|
|
109
|
-
if (this.requestInterval) {
|
|
110
|
-
clearInterval(this.requestInterval);
|
|
111
|
-
}
|
|
112
|
-
// Here we would send OpenConnectionRequestTwo
|
|
113
|
-
// The framer handles this transition
|
|
114
|
-
});
|
|
115
|
-
// Handle open-connection-reply-two event
|
|
116
|
-
this.once("open-connection-reply-two", (packet) => {
|
|
117
|
-
const mtu = packet.mtu;
|
|
118
|
-
if (mtu > 400 && mtu < 1500) {
|
|
119
|
-
currentStage = "completed";
|
|
120
|
-
utils_1.Logger.debug(`[Client] Received OpenConnectionReplyTwo with MTU: ${mtu}`);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
cleanup();
|
|
124
|
-
reject(new Error(`Invalid MTU size: ${mtu}`));
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
// Send initial request
|
|
128
|
-
this.emit("open-connection-request-one", requestOne);
|
|
129
|
-
this.send(requestOne.serialize());
|
|
130
|
-
// Set up interval to resend requests
|
|
131
|
-
this.requestInterval = setInterval(() => {
|
|
132
|
-
if (!isResolved && currentStage === "request-one") {
|
|
133
|
-
utils_1.Logger.debug("[Client] Resending OpenConnectionRequestOne");
|
|
134
|
-
this.send(requestOne.serialize());
|
|
135
|
-
}
|
|
136
|
-
}, REQUEST_INTERVAL);
|
|
137
|
-
// Handle successful connection
|
|
138
|
-
this.once("new-incoming-connection", () => {
|
|
139
|
-
if (!isResolved) {
|
|
140
|
-
isResolved = true;
|
|
141
|
-
this.emit("connect", advertisement);
|
|
142
|
-
this.status = proto_1.Status.Connected;
|
|
143
|
-
cleanup();
|
|
144
|
-
resolve(advertisement);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
// Handle connection errors
|
|
148
|
-
this.once("error", (error) => {
|
|
149
|
-
cleanup();
|
|
150
|
-
reject(error);
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
this.status = proto_1.Status.Disconnected;
|
|
156
|
-
throw error;
|
|
157
|
-
}
|
|
47
|
+
onTick() {
|
|
48
|
+
const isDisconnected = this.status === shared_1.ConnectionStatus.Disconnected;
|
|
49
|
+
const isDisconnecting = this.status === shared_1.ConnectionStatus.Disconnecting;
|
|
50
|
+
const canPing = isDisconnected && this.tick % this.options.pingRate === 0;
|
|
51
|
+
if (canPing)
|
|
52
|
+
this.ping();
|
|
53
|
+
if (!isDisconnecting || !isDisconnected) {
|
|
54
|
+
this.session.onTick(this.tick);
|
|
55
|
+
}
|
|
56
|
+
this.tick++;
|
|
158
57
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
58
|
+
onMessage(data, rinfo) {
|
|
59
|
+
let id = data[0];
|
|
60
|
+
const isOnline = (id & 0xf0) === 0x80;
|
|
61
|
+
if (isOnline)
|
|
62
|
+
id = 0x80;
|
|
63
|
+
switch (id) {
|
|
64
|
+
case shared_1.Packets.UnconnectedPong: {
|
|
65
|
+
const pong = new shared_1.UnconnectedPong(data).deserialize();
|
|
66
|
+
this.emit("unconnectedPong", pong);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case shared_1.Packets.OpenConnectionReply1: {
|
|
70
|
+
const reply = new shared_1.OpenConnectionReplyOne(data).deserialize();
|
|
71
|
+
const request = new shared_1.OpenConnectionRequestTwo();
|
|
72
|
+
request.address = shared_1.Address.fromIdentifier(rinfo);
|
|
73
|
+
request.mtu = reply.mtu;
|
|
74
|
+
request.guid = this.options.guid;
|
|
75
|
+
this.send(request.serialize());
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
case shared_1.Packets.OpenConnectionReply2: {
|
|
79
|
+
const reply = new shared_1.OpenConnectionReplyTwo(data).deserialize();
|
|
80
|
+
const request = new shared_1.ConnectionRequest();
|
|
81
|
+
request.guid = this.options.guid;
|
|
82
|
+
request.timestamp = BigInt(Date.now());
|
|
83
|
+
const serialized = request.serialize();
|
|
84
|
+
this.frameAndSend(serialized, shared_1.Priority.High);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case shared_1.Packets.FrameSet: {
|
|
88
|
+
const frameSet = new shared_1.FrameSet(data).deserialize();
|
|
89
|
+
this.session.onFrameSet(frameSet);
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case shared_1.Packets.Ack: {
|
|
93
|
+
const ack = new shared_1.Ack(data).deserialize();
|
|
94
|
+
this.session.onAck(ack);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case shared_1.Packets.Nack: {
|
|
98
|
+
const nack = new shared_1.Ack(data).deserialize();
|
|
99
|
+
this.session.onNack(nack);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
default: {
|
|
103
|
+
shared_2.Logger.warn(`Unknown packet type: ${id}`);
|
|
104
|
+
break;
|
|
164
105
|
}
|
|
165
|
-
this.framer.sendFrame(frame, priority);
|
|
166
|
-
}
|
|
167
|
-
catch (error) {
|
|
168
|
-
utils_1.Logger.error("[Client] Failed to send frame", error);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
frameAndSend(payload, priority) {
|
|
172
|
-
const frame = new proto_1.Frame();
|
|
173
|
-
frame.payload = payload;
|
|
174
|
-
frame.orderChannel = 0;
|
|
175
|
-
this.sendFrame(frame, priority);
|
|
176
|
-
}
|
|
177
|
-
send(buffer) {
|
|
178
|
-
if (this.status === proto_1.Status.Disconnected) {
|
|
179
|
-
utils_1.Logger.warn("[Client] Attempting to send packet while disconnected");
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (!this.socket) {
|
|
183
|
-
utils_1.Logger.error("[Client] Cannot send packet: socket is null");
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
utils_1.Logger.debug(`[Client] Sending packet ${buffer[0]}, ${buffer.length} bytes to ${this.options.address}:${this.options.port}`);
|
|
187
|
-
try {
|
|
188
|
-
this.socket.send(buffer, 0, buffer.length, this.options.port, this.options.address, (err) => {
|
|
189
|
-
if (err) {
|
|
190
|
-
utils_1.Logger.error("[Client] Failed to send packet", err);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
utils_1.Logger.error("[Client] Failed to send packet", error);
|
|
196
106
|
}
|
|
197
107
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
const disconnect = new disconnect_1.default();
|
|
205
|
-
this.socket.send(disconnect.serialize(), 0, disconnect.serialize().length, this.options.port, this.options.address);
|
|
108
|
+
handleOnline(data) {
|
|
109
|
+
const id = data[0];
|
|
110
|
+
switch (id) {
|
|
111
|
+
case 254: {
|
|
112
|
+
this.emit("encapsulated", data);
|
|
113
|
+
break;
|
|
206
114
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const state = socketWithState[stateSymbol];
|
|
210
|
-
if (state?.handle) {
|
|
211
|
-
state.handle.close();
|
|
212
|
-
state.handle = null;
|
|
115
|
+
case shared_1.Packets.ConnectedPong: {
|
|
116
|
+
break;
|
|
213
117
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
118
|
+
case shared_1.Packets.ConnectedPing: {
|
|
119
|
+
const ping = new shared_1.ConnectedPing(data).deserialize();
|
|
120
|
+
const pong = new shared_1.ConnectedPong();
|
|
121
|
+
pong.pingTimestamp = ping.timestamp;
|
|
122
|
+
pong.pongTimestamp = BigInt(Date.now());
|
|
123
|
+
this.frameAndSend(ping.serialize(), shared_1.Priority.High);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case shared_1.Packets.ConnectionRequestAccepted: {
|
|
127
|
+
const accepted = new shared_1.ConnectionRequestAccepted(data).deserialize();
|
|
128
|
+
const nic = new shared_1.NewIncomingConnection();
|
|
129
|
+
nic.address = new shared_1.Address(this.socket.address().address, this.socket.address().port, this.socket.address().family === "IPv4" ? 4 : 6);
|
|
130
|
+
nic.internalAddress = new shared_1.Address("127.0.0.1", 0, 4);
|
|
131
|
+
nic.incomingTimestamp = BigInt(Date.now());
|
|
132
|
+
nic.serverTimestamp = accepted.timestamp;
|
|
133
|
+
this.frameAndSend(nic.serialize(), shared_1.Priority.High);
|
|
134
|
+
this.emit("connect");
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
default: {
|
|
138
|
+
shared_2.Logger.warn(`Unknown packet type: ${id}`);
|
|
139
|
+
break;
|
|
230
140
|
}
|
|
231
|
-
catch (_) { }
|
|
232
|
-
this.socket = null;
|
|
233
141
|
}
|
|
234
142
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return;
|
|
238
|
-
this.framer._events = undefined;
|
|
239
|
-
this.framer._eventsCount = undefined;
|
|
240
|
-
this.framer = null;
|
|
143
|
+
sendFrame(frame, priority = shared_1.Priority.Medium) {
|
|
144
|
+
this.session.sendFrame(frame, priority);
|
|
241
145
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
clearTimeout(this.connectionTimeout);
|
|
255
|
-
this.connectionTimeout = undefined;
|
|
256
|
-
}
|
|
257
|
-
if (this.requestInterval) {
|
|
258
|
-
clearInterval(this.requestInterval);
|
|
259
|
-
this.requestInterval = undefined;
|
|
260
|
-
}
|
|
261
|
-
this.removeAll();
|
|
262
|
-
this.removeAllAfter();
|
|
263
|
-
this.removeAllBefore();
|
|
264
|
-
this.cleanupSocket();
|
|
265
|
-
this.cleanupFramer();
|
|
266
|
-
this.serverAddress = null;
|
|
267
|
-
this._events = undefined;
|
|
268
|
-
this._eventsCount = undefined;
|
|
269
|
-
this.status = proto_1.Status.Disconnected;
|
|
270
|
-
utils_1.Logger.debug("[Client] Cleanup complete");
|
|
146
|
+
frameAndSend(data, priority = shared_1.Priority.Medium) {
|
|
147
|
+
this.session.frameAndSend(data, priority);
|
|
148
|
+
}
|
|
149
|
+
ping() {
|
|
150
|
+
const ping = new shared_1.UnconnectedPing();
|
|
151
|
+
ping.guid = this.options.guid;
|
|
152
|
+
ping.timestamp = BigInt(Date.now());
|
|
153
|
+
const serialized = ping.serialize();
|
|
154
|
+
this.send(serialized);
|
|
155
|
+
}
|
|
156
|
+
send(data) {
|
|
157
|
+
this.socket.send(data, this.options.port, this.options.address);
|
|
271
158
|
}
|
|
272
159
|
disconnect() {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const cleanupTimeout = setTimeout(() => {
|
|
279
|
-
utils_1.Logger.warn("[Client] Disconnect timeout reached, forcing cleanup");
|
|
280
|
-
try {
|
|
281
|
-
this.cleanup();
|
|
282
|
-
resolve();
|
|
283
|
-
}
|
|
284
|
-
catch (error) {
|
|
285
|
-
reject(error);
|
|
286
|
-
}
|
|
287
|
-
}, 5000);
|
|
288
|
-
try {
|
|
289
|
-
setImmediate(() => {
|
|
290
|
-
try {
|
|
291
|
-
this.cleanup();
|
|
292
|
-
clearTimeout(cleanupTimeout);
|
|
293
|
-
resolve();
|
|
294
|
-
}
|
|
295
|
-
catch (error) {
|
|
296
|
-
clearTimeout(cleanupTimeout);
|
|
297
|
-
reject(error);
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
catch (error) {
|
|
302
|
-
clearTimeout(cleanupTimeout);
|
|
303
|
-
reject(error);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
160
|
+
this.socket.close();
|
|
161
|
+
if (this.interval)
|
|
162
|
+
clearInterval(this.interval);
|
|
306
163
|
}
|
|
307
164
|
}
|
|
308
165
|
exports.Client = Client;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client-events"), exports);
|
|
18
17
|
__exportStar(require("./client"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-events.d.ts","sourceRoot":"","sources":["../../../src/client/types/client-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,SAAS,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
mtu: number;
|
|
3
|
+
address: string;
|
|
4
|
+
port: number;
|
|
5
|
+
guid: bigint;
|
|
6
|
+
tickRate: number;
|
|
7
|
+
pingRate: number;
|
|
8
|
+
timeout: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const getRandomGuid: () => bigint;
|
|
11
|
+
export declare const defaultClientOptions: ClientOptions;
|
|
12
|
+
//# sourceMappingURL=client-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-options.d.ts","sourceRoot":"","sources":["../../../src/client/types/client-options.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,eAAO,MAAM,aAAa,cACgC,CAAC;AAE3D,eAAO,MAAM,oBAAoB,EAAE,aAQlC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultClientOptions = exports.getRandomGuid = void 0;
|
|
4
|
+
const getRandomGuid = () => BigInt(Math.floor(Date.now() + Math.random() * 10000000));
|
|
5
|
+
exports.getRandomGuid = getRandomGuid;
|
|
6
|
+
exports.defaultClientOptions = {
|
|
7
|
+
mtu: 1492,
|
|
8
|
+
address: "127.0.0.1",
|
|
9
|
+
port: 19132,
|
|
10
|
+
guid: (0, exports.getRandomGuid)(),
|
|
11
|
+
tickRate: 20,
|
|
12
|
+
pingRate: 40,
|
|
13
|
+
timeout: 30000,
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./client-options"), exports);
|
|
18
|
+
__exportStar(require("./client-events"), exports);
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
require("reflect-metadata");
|
|
18
|
-
__exportStar(require("./proto"), exports);
|
|
19
|
-
__exportStar(require("./utils"), exports);
|
|
20
17
|
__exportStar(require("./client"), exports);
|
|
18
|
+
__exportStar(require("./shared"), exports);
|
|
21
19
|
__exportStar(require("./server"), exports);
|