@colyseus/sdk 0.17.13 → 0.17.14

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 (62) hide show
  1. package/build/3rd_party/discord.cjs +1 -1
  2. package/build/3rd_party/discord.mjs +1 -1
  3. package/build/Auth.cjs +1 -1
  4. package/build/Auth.mjs +1 -1
  5. package/build/Client.cjs +3 -2
  6. package/build/Client.cjs.map +1 -1
  7. package/build/Client.d.ts +1 -1
  8. package/build/Client.mjs +3 -2
  9. package/build/Client.mjs.map +1 -1
  10. package/build/Connection.cjs +1 -1
  11. package/build/Connection.mjs +1 -1
  12. package/build/HTTP.cjs +1 -1
  13. package/build/HTTP.mjs +1 -1
  14. package/build/Protocol.cjs +1 -1
  15. package/build/Protocol.mjs +1 -1
  16. package/build/Room.cjs +7 -7
  17. package/build/Room.cjs.map +1 -1
  18. package/build/Room.mjs +2 -2
  19. package/build/Room.mjs.map +1 -1
  20. package/build/Storage.cjs +1 -1
  21. package/build/Storage.mjs +1 -1
  22. package/build/core/nanoevents.cjs +1 -1
  23. package/build/core/nanoevents.mjs +1 -1
  24. package/build/core/signal.cjs +1 -1
  25. package/build/core/signal.mjs +1 -1
  26. package/build/core/utils.cjs +1 -1
  27. package/build/core/utils.mjs +1 -1
  28. package/build/debug.cjs +1 -1
  29. package/build/debug.mjs +1 -1
  30. package/build/errors/Errors.cjs +1 -12
  31. package/build/errors/Errors.cjs.map +1 -1
  32. package/build/errors/Errors.d.ts +0 -10
  33. package/build/errors/Errors.mjs +2 -13
  34. package/build/errors/Errors.mjs.map +1 -1
  35. package/build/index.cjs +11 -11
  36. package/build/index.cjs.map +1 -1
  37. package/build/index.d.ts +2 -2
  38. package/build/index.mjs +3 -3
  39. package/build/index.mjs.map +1 -1
  40. package/build/legacy.cjs +1 -1
  41. package/build/legacy.mjs +1 -1
  42. package/build/serializer/NoneSerializer.cjs +1 -1
  43. package/build/serializer/NoneSerializer.mjs +1 -1
  44. package/build/serializer/SchemaSerializer.cjs +1 -1
  45. package/build/serializer/SchemaSerializer.mjs +1 -1
  46. package/build/serializer/Serializer.cjs +1 -1
  47. package/build/serializer/Serializer.mjs +1 -1
  48. package/build/transport/H3Transport.cjs +1 -1
  49. package/build/transport/H3Transport.mjs +1 -1
  50. package/build/transport/WebSocketTransport.cjs +1 -1
  51. package/build/transport/WebSocketTransport.mjs +1 -1
  52. package/dist/colyseus-cocos-creator.js +67 -38
  53. package/dist/colyseus-cocos-creator.js.map +1 -1
  54. package/dist/colyseus.js +67 -38
  55. package/dist/colyseus.js.map +1 -1
  56. package/dist/debug.js +9 -20
  57. package/dist/debug.js.map +1 -1
  58. package/package.json +3 -3
  59. package/src/Client.ts +2 -2
  60. package/src/Room.ts +1 -2
  61. package/src/errors/Errors.ts +0 -11
  62. package/src/index.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import './legacy';\n\nexport { ColyseusSDK, Client, MatchMakeError, type JoinOptions, type EndpointSettings, type ClientOptions, type ISeatReservation as SeatReservation } from './Client.ts';\nexport { Protocol, ErrorCode } from './Protocol.ts';\nexport { Room, type RoomAvailable } from './Room.ts';\nexport { Auth, type AuthSettings, type PopupSettings, type AuthResponse, type UserDataResponse, type ForgotPasswordResponse, type AuthData } from \"./Auth.ts\";\nexport { ServerError, CloseCode } from './errors/Errors.ts';\nexport type { InferRoomConstructor } from './core/utils.ts';\n\n/*\n * Serializers\n */\nimport { SchemaSerializer, getStateCallbacks } from \"./serializer/SchemaSerializer.ts\";\nimport { NoneSerializer } from \"./serializer/NoneSerializer.ts\";\nimport { registerSerializer } from './serializer/Serializer.ts';\nexport { Callbacks } from \"@colyseus/schema\";\n\nexport { registerSerializer, SchemaSerializer, getStateCallbacks };\nregisterSerializer('schema', SchemaSerializer);\nregisterSerializer('none', NoneSerializer);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,CAAC;AAC9C,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import './legacy';\n\nexport { ColyseusSDK, Client, MatchMakeError, type JoinOptions, type EndpointSettings, type ClientOptions, type ISeatReservation as SeatReservation } from './Client.ts';\nexport { Room, type RoomAvailable } from './Room.ts';\nexport { Auth, type AuthSettings, type PopupSettings, type AuthResponse, type UserDataResponse, type ForgotPasswordResponse, type AuthData } from \"./Auth.ts\";\nexport { ServerError } from './errors/Errors.ts';\nexport { CloseCode, ErrorCode, Protocol } from '@colyseus/shared-types'; // convenience re-export / backwards compatibility\nexport type { InferRoomConstructor } from './core/utils.ts';\n\n/*\n * Serializers\n */\nimport { SchemaSerializer, getStateCallbacks } from \"./serializer/SchemaSerializer.ts\";\nimport { NoneSerializer } from \"./serializer/NoneSerializer.ts\";\nimport { registerSerializer } from './serializer/Serializer.ts';\nexport { Callbacks } from \"@colyseus/schema\";\n\nexport { registerSerializer, SchemaSerializer, getStateCallbacks };\nregisterSerializer('schema', SchemaSerializer);\nregisterSerializer('none', NoneSerializer);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,CAAC;AAC9C,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC;;;;"}
package/build/legacy.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  //
package/build/legacy.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  //
8
8
  // Polyfills for legacy environments
9
9
  //
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  class NoneSerializer {
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  class NoneSerializer {
8
8
  setState(rawState) { }
9
9
  getState() { return null; }
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  var schema = require('@colyseus/schema');
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  import { getDecoderStateCallbacks, Reflection, Decoder } from '@colyseus/schema';
8
8
 
9
9
  //
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  const serializers = {};
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  const serializers = {};
8
8
  function registerSerializer(id, serializer) {
9
9
  serializers[id] = serializer;
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  var tslib = require('tslib');
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  import { encode, decode } from '@colyseus/schema';
8
8
 
9
9
  class H3TransportTransport {
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  'use strict';
8
8
 
9
9
  var NodeWebSocket = require('ws');
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13
6
+ // colyseus.js@0.17.14
7
7
  import NodeWebSocket from 'ws';
8
8
 
9
9
  const WebSocket = globalThis.WebSocket || NodeWebSocket;
@@ -3,7 +3,7 @@
3
3
  // This software is released under the MIT License.
4
4
  // https://opensource.org/license/MIT
5
5
  //
6
- // colyseus.js@0.17.13 - @colyseus/schema 4.0.1
6
+ // colyseus.js@0.17.14 - @colyseus/schema 4.0.1
7
7
  // THIS VERSION USES "XMLHttpRequest" INSTEAD OF "fetch" FOR COMPATIBILITY WITH COCOS CREATOR
8
8
  (function (global, factory) {
9
9
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -82,17 +82,43 @@
82
82
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
83
83
  };
84
84
 
85
- exports.CloseCode = void 0;
86
- (function (CloseCode) {
87
- CloseCode[CloseCode["NORMAL_CLOSURE"] = 1000] = "NORMAL_CLOSURE";
88
- CloseCode[CloseCode["GOING_AWAY"] = 1001] = "GOING_AWAY";
89
- CloseCode[CloseCode["NO_STATUS_RECEIVED"] = 1005] = "NO_STATUS_RECEIVED";
90
- CloseCode[CloseCode["ABNORMAL_CLOSURE"] = 1006] = "ABNORMAL_CLOSURE";
91
- CloseCode[CloseCode["CONSENTED"] = 4000] = "CONSENTED";
92
- CloseCode[CloseCode["SERVER_SHUTDOWN"] = 4001] = "SERVER_SHUTDOWN";
93
- CloseCode[CloseCode["WITH_ERROR"] = 4002] = "WITH_ERROR";
94
- CloseCode[CloseCode["DEVMODE_RESTART"] = 4010] = "DEVMODE_RESTART";
95
- })(exports.CloseCode || (exports.CloseCode = {}));
85
+ // packages/shared-types/src/Protocol.ts
86
+ var Protocol$1 = {
87
+ // Room-related (10~19)
88
+ JOIN_ROOM: 10,
89
+ ERROR: 11,
90
+ LEAVE_ROOM: 12,
91
+ ROOM_DATA: 13,
92
+ ROOM_STATE: 14,
93
+ ROOM_STATE_PATCH: 15,
94
+ ROOM_DATA_SCHEMA: 16,
95
+ // DEPRECATED: used to send schema instances via room.send()
96
+ ROOM_DATA_BYTES: 17,
97
+ PING: 18
98
+ };
99
+ var ErrorCode$1 = {
100
+ MATCHMAKE_NO_HANDLER: 520,
101
+ MATCHMAKE_INVALID_CRITERIA: 521,
102
+ MATCHMAKE_INVALID_ROOM_ID: 522,
103
+ MATCHMAKE_UNHANDLED: 523,
104
+ // generic exception during onCreate/onJoin
105
+ MATCHMAKE_EXPIRED: 524,
106
+ // generic exception during onCreate/onJoin
107
+ AUTH_FAILED: 525,
108
+ APPLICATION_ERROR: 526,
109
+ INVALID_PAYLOAD: 4217
110
+ };
111
+ var CloseCode = {
112
+ NORMAL_CLOSURE: 1e3,
113
+ GOING_AWAY: 1001,
114
+ NO_STATUS_RECEIVED: 1005,
115
+ ABNORMAL_CLOSURE: 1006,
116
+ CONSENTED: 4e3,
117
+ SERVER_SHUTDOWN: 4001,
118
+ WITH_ERROR: 4002,
119
+ DEVMODE_RESTART: 4010
120
+ };
121
+
96
122
  class ServerError extends Error {
97
123
  constructor(code, message) {
98
124
  super(message);
@@ -8331,7 +8357,7 @@
8331
8357
  }
8332
8358
 
8333
8359
  // Use codes between 0~127 for lesser throughput (1 byte)
8334
- exports.Protocol = void 0;
8360
+ var Protocol;
8335
8361
  (function (Protocol) {
8336
8362
  // Room-related (10~19)
8337
8363
  Protocol[Protocol["HANDSHAKE"] = 9] = "HANDSHAKE";
@@ -8344,8 +8370,8 @@
8344
8370
  Protocol[Protocol["ROOM_DATA_SCHEMA"] = 16] = "ROOM_DATA_SCHEMA";
8345
8371
  Protocol[Protocol["ROOM_DATA_BYTES"] = 17] = "ROOM_DATA_BYTES";
8346
8372
  Protocol[Protocol["PING"] = 18] = "PING";
8347
- })(exports.Protocol || (exports.Protocol = {}));
8348
- exports.ErrorCode = void 0;
8373
+ })(Protocol || (Protocol = {}));
8374
+ var ErrorCode;
8349
8375
  (function (ErrorCode) {
8350
8376
  ErrorCode[ErrorCode["MATCHMAKE_NO_HANDLER"] = 520] = "MATCHMAKE_NO_HANDLER";
8351
8377
  ErrorCode[ErrorCode["MATCHMAKE_INVALID_CRITERIA"] = 521] = "MATCHMAKE_INVALID_CRITERIA";
@@ -8354,7 +8380,7 @@
8354
8380
  ErrorCode[ErrorCode["MATCHMAKE_EXPIRED"] = 524] = "MATCHMAKE_EXPIRED";
8355
8381
  ErrorCode[ErrorCode["AUTH_FAILED"] = 525] = "AUTH_FAILED";
8356
8382
  ErrorCode[ErrorCode["APPLICATION_ERROR"] = 526] = "APPLICATION_ERROR";
8357
- })(exports.ErrorCode || (exports.ErrorCode = {}));
8383
+ })(ErrorCode || (ErrorCode = {}));
8358
8384
 
8359
8385
  const serializers = {};
8360
8386
  function registerSerializer(id, serializer) {
@@ -8551,10 +8577,10 @@
8551
8577
  this.onError.invoke(e.code, e.reason);
8552
8578
  return;
8553
8579
  }
8554
- if (e.code === exports.CloseCode.NO_STATUS_RECEIVED ||
8555
- e.code === exports.CloseCode.ABNORMAL_CLOSURE ||
8556
- e.code === exports.CloseCode.GOING_AWAY ||
8557
- e.code === exports.CloseCode.DEVMODE_RESTART) {
8580
+ if (e.code === CloseCode.NO_STATUS_RECEIVED ||
8581
+ e.code === CloseCode.ABNORMAL_CLOSURE ||
8582
+ e.code === CloseCode.GOING_AWAY ||
8583
+ e.code === CloseCode.DEVMODE_RESTART) {
8558
8584
  this.onDrop.invoke(e.code, e.reason);
8559
8585
  this.handleReconnection();
8560
8586
  }
@@ -8587,7 +8613,7 @@
8587
8613
  this.onLeave((code) => resolve(code));
8588
8614
  if (this.connection) {
8589
8615
  if (consented) {
8590
- this.packr.buffer[0] = exports.Protocol.LEAVE_ROOM;
8616
+ this.packr.buffer[0] = Protocol.LEAVE_ROOM;
8591
8617
  this.connection.send(this.packr.buffer.subarray(0, 1));
8592
8618
  }
8593
8619
  else {
@@ -8595,7 +8621,7 @@
8595
8621
  }
8596
8622
  }
8597
8623
  else {
8598
- this.onLeave.invoke(exports.CloseCode.CONSENTED);
8624
+ this.onLeave.invoke(CloseCode.CONSENTED);
8599
8625
  }
8600
8626
  });
8601
8627
  }
@@ -8605,12 +8631,12 @@
8605
8631
  ping(callback) {
8606
8632
  __classPrivateFieldSet(this, _Room_lastPingTime, now(), "f");
8607
8633
  __classPrivateFieldSet(this, _Room_pingCallback, callback, "f");
8608
- this.packr.buffer[0] = exports.Protocol.PING;
8634
+ this.packr.buffer[0] = Protocol.PING;
8609
8635
  this.connection.send(this.packr.buffer.subarray(0, 1));
8610
8636
  }
8611
8637
  send(messageType, payload) {
8612
8638
  const it = { offset: 1 };
8613
- this.packr.buffer[0] = exports.Protocol.ROOM_DATA;
8639
+ this.packr.buffer[0] = Protocol.ROOM_DATA;
8614
8640
  if (typeof (messageType) === "string") {
8615
8641
  umdExports.encode.string(this.packr.buffer, messageType, it);
8616
8642
  }
@@ -8636,7 +8662,7 @@
8636
8662
  return;
8637
8663
  }
8638
8664
  const it = { offset: 1 };
8639
- this.packr.buffer[0] = exports.Protocol.ROOM_DATA;
8665
+ this.packr.buffer[0] = Protocol.ROOM_DATA;
8640
8666
  if (typeof (type) === "string") {
8641
8667
  umdExports.encode.string(this.packr.buffer, type, it);
8642
8668
  }
@@ -8652,7 +8678,7 @@
8652
8678
  }
8653
8679
  sendBytes(type, bytes) {
8654
8680
  const it = { offset: 1 };
8655
- this.packr.buffer[0] = exports.Protocol.ROOM_DATA_BYTES;
8681
+ this.packr.buffer[0] = Protocol.ROOM_DATA_BYTES;
8656
8682
  if (typeof (type) === "string") {
8657
8683
  umdExports.encode.string(this.packr.buffer, type, it);
8658
8684
  }
@@ -8694,7 +8720,7 @@
8694
8720
  const buffer = new Uint8Array(event.data);
8695
8721
  const it = { offset: 1 };
8696
8722
  const code = buffer[0];
8697
- if (code === exports.Protocol.JOIN_ROOM) {
8723
+ if (code === Protocol.JOIN_ROOM) {
8698
8724
  const reconnectionToken = umdExports.decode.utf8Read(buffer, it, buffer[it.offset++]);
8699
8725
  this.serializerId = umdExports.decode.utf8Read(buffer, it, buffer[it.offset++]);
8700
8726
  // Instantiate serializer if not locally available.
@@ -8717,7 +8743,7 @@
8717
8743
  }
8718
8744
  this.reconnectionToken = `${this.roomId}:${reconnectionToken}`;
8719
8745
  // acknowledge successfull JOIN_ROOM
8720
- this.packr.buffer[0] = exports.Protocol.JOIN_ROOM;
8746
+ this.packr.buffer[0] = Protocol.JOIN_ROOM;
8721
8747
  this.connection.send(this.packr.buffer.subarray(0, 1));
8722
8748
  // Send any enqueued messages that were buffered while disconnected
8723
8749
  if (this.reconnection.enqueuedMessages.length > 0) {
@@ -8728,23 +8754,23 @@
8728
8754
  this.reconnection.enqueuedMessages = [];
8729
8755
  }
8730
8756
  }
8731
- else if (code === exports.Protocol.ERROR) {
8757
+ else if (code === Protocol.ERROR) {
8732
8758
  const code = umdExports.decode.number(buffer, it);
8733
8759
  const message = umdExports.decode.string(buffer, it);
8734
8760
  this.onError.invoke(code, message);
8735
8761
  }
8736
- else if (code === exports.Protocol.LEAVE_ROOM) {
8762
+ else if (code === Protocol.LEAVE_ROOM) {
8737
8763
  this.leave();
8738
8764
  }
8739
- else if (code === exports.Protocol.ROOM_STATE) {
8765
+ else if (code === Protocol.ROOM_STATE) {
8740
8766
  this.serializer.setState(buffer, it);
8741
8767
  this.onStateChange.invoke(this.serializer.getState());
8742
8768
  }
8743
- else if (code === exports.Protocol.ROOM_STATE_PATCH) {
8769
+ else if (code === Protocol.ROOM_STATE_PATCH) {
8744
8770
  this.serializer.patch(buffer, it);
8745
8771
  this.onStateChange.invoke(this.serializer.getState());
8746
8772
  }
8747
- else if (code === exports.Protocol.ROOM_DATA) {
8773
+ else if (code === Protocol.ROOM_DATA) {
8748
8774
  const type = (umdExports.decode.stringCheck(buffer, it))
8749
8775
  ? umdExports.decode.string(buffer, it)
8750
8776
  : umdExports.decode.number(buffer, it);
@@ -8753,13 +8779,13 @@
8753
8779
  : undefined;
8754
8780
  this.dispatchMessage(type, message);
8755
8781
  }
8756
- else if (code === exports.Protocol.ROOM_DATA_BYTES) {
8782
+ else if (code === Protocol.ROOM_DATA_BYTES) {
8757
8783
  const type = (umdExports.decode.stringCheck(buffer, it))
8758
8784
  ? umdExports.decode.string(buffer, it)
8759
8785
  : umdExports.decode.number(buffer, it);
8760
8786
  this.dispatchMessage(type, buffer.subarray(it.offset));
8761
8787
  }
8762
- else if (code === exports.Protocol.PING) {
8788
+ else if (code === Protocol.PING) {
8763
8789
  (_a = __classPrivateFieldGet(this, _Room_pingCallback, "f")) === null || _a === void 0 ? void 0 : _a.call(this, now() - __classPrivateFieldGet(this, _Room_lastPingTime, "f"));
8764
8790
  __classPrivateFieldSet(this, _Room_pingCallback, undefined, "f");
8765
8791
  }
@@ -9433,14 +9459,14 @@
9433
9459
  let pingStart = 0;
9434
9460
  conn.events.onopen = () => {
9435
9461
  pingStart = Date.now();
9436
- conn.send(new Uint8Array([exports.Protocol.PING]));
9462
+ conn.send(new Uint8Array([Protocol.PING]));
9437
9463
  };
9438
9464
  conn.events.onmessage = (_) => {
9439
9465
  latencies.push(Date.now() - pingStart);
9440
9466
  if (latencies.length < pingCount) {
9441
9467
  // Send another ping
9442
9468
  pingStart = Date.now();
9443
- conn.send(new Uint8Array([exports.Protocol.PING]));
9469
+ conn.send(new Uint8Array([Protocol.PING]));
9444
9470
  }
9445
9471
  else {
9446
9472
  // Done, calculate average and close
@@ -9450,7 +9476,7 @@
9450
9476
  }
9451
9477
  };
9452
9478
  conn.events.onerror = (event) => {
9453
- reject(new ServerError(exports.CloseCode.ABNORMAL_CLOSURE, `Failed to get latency: ${event.message}`));
9479
+ reject(new ServerError(CloseCode.ABNORMAL_CLOSURE, `Failed to get latency: ${event.message}`));
9454
9480
  };
9455
9481
  conn.connect(this.getHttpEndpoint());
9456
9482
  });
@@ -9544,8 +9570,11 @@
9544
9570
  exports.Auth = Auth;
9545
9571
  exports.Callbacks = umdExports.Callbacks;
9546
9572
  exports.Client = Client;
9573
+ exports.CloseCode = CloseCode;
9547
9574
  exports.ColyseusSDK = ColyseusSDK;
9575
+ exports.ErrorCode = ErrorCode$1;
9548
9576
  exports.MatchMakeError = MatchMakeError;
9577
+ exports.Protocol = Protocol$1;
9549
9578
  exports.Room = Room;
9550
9579
  exports.SchemaSerializer = SchemaSerializer;
9551
9580
  exports.ServerError = ServerError;