@colyseus/core
Version:
Multiplayer Framework for Node.js.
147 lines (146 loc) • 6 kB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var src_exports = {};
__export(src_exports, {
ClientArray: () => import_Transport.ClientArray,
ClientState: () => import_Transport.ClientState,
Clock: () => import_timer.default,
Deferred: () => import_Utils.Deferred,
Delayed: () => import_timer.Delayed,
ErrorCode: () => import_Protocol.ErrorCode,
HttpServerMock: () => import_Utils.HttpServerMock,
LobbyRoom: () => import_LobbyRoom.LobbyRoom,
LocalPresence: () => import_LocalPresence.LocalPresence,
OnAuthException: () => import_RoomExceptions.OnAuthException,
OnCreateException: () => import_RoomExceptions.OnCreateException,
OnDisposeException: () => import_RoomExceptions.OnDisposeException,
OnJoinException: () => import_RoomExceptions.OnJoinException,
OnLeaveException: () => import_RoomExceptions.OnLeaveException,
OnMessageException: () => import_RoomExceptions.OnMessageException,
Protocol: () => import_Protocol.Protocol,
RegisteredHandler: () => import_RegisteredHandler.RegisteredHandler,
RelayRoom: () => import_RelayRoom.RelayRoom,
Room: () => import_Room.Room,
RoomInternalState: () => import_Room.RoomInternalState,
SchemaSerializer: () => import_SchemaSerializer.SchemaSerializer,
Server: () => import_Server.Server,
ServerError: () => import_ServerError.ServerError,
SimulationIntervalException: () => import_RoomExceptions.SimulationIntervalException,
TimedEventException: () => import_RoomExceptions.TimedEventException,
Transport: () => import_Transport.Transport,
debugAndPrintError: () => import_Debug.debugAndPrintError,
debugConnection: () => import_Debug.debugConnection,
debugDriver: () => import_Debug.debugDriver,
debugError: () => import_Debug.debugError,
debugMatchMaking: () => import_Debug.debugMatchMaking,
debugMessage: () => import_Debug.debugMessage,
debugPatch: () => import_Debug.debugPatch,
debugPresence: () => import_Debug.debugPresence,
generateId: () => import_Utils.generateId,
getBearerToken: () => import_Utils.getBearerToken,
getMessageBytes: () => import_Protocol.getMessageBytes,
isDevMode: () => import_DevMode.isDevMode,
logger: () => import_Logger.logger,
matchMaker: () => matchMaker,
requestFromIPC: () => import_IPC.requestFromIPC,
spliceOne: () => import_Utils.spliceOne,
subscribeIPC: () => import_IPC.subscribeIPC,
subscribeLobby: () => import_Lobby.subscribeLobby,
updateLobby: () => import_Lobby.updateLobby
});
module.exports = __toCommonJS(src_exports);
var import_timer = __toESM(require("@colyseus/timer"));
var import_Server = require("./Server.js");
var import_Room = require("./Room.js");
var import_Protocol = require("./Protocol.js");
var import_RegisteredHandler = require("./matchmaker/RegisteredHandler.js");
var import_ServerError = require("./errors/ServerError.js");
var import_RoomExceptions = require("./errors/RoomExceptions.js");
var matchMaker = __toESM(require("./MatchMaker.js"));
var import_Lobby = require("./matchmaker/Lobby.js");
__reExport(src_exports, require("./matchmaker/driver/local/LocalDriver.js"), module.exports);
var import_Transport = require("./Transport.js");
var import_LocalPresence = require("./presence/LocalPresence.js");
var import_SchemaSerializer = require("./serializer/SchemaSerializer.js");
var import_Utils = require("./utils/Utils.js");
var import_DevMode = require("./utils/DevMode.js");
var import_IPC = require("./IPC.js");
var import_Debug = require("./Debug.js");
var import_LobbyRoom = require("./rooms/LobbyRoom.js");
var import_RelayRoom = require("./rooms/RelayRoom.js");
var import_Logger = require("./Logger.js");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ClientArray,
ClientState,
Clock,
Deferred,
Delayed,
ErrorCode,
HttpServerMock,
LobbyRoom,
LocalPresence,
OnAuthException,
OnCreateException,
OnDisposeException,
OnJoinException,
OnLeaveException,
OnMessageException,
Protocol,
RegisteredHandler,
RelayRoom,
Room,
RoomInternalState,
SchemaSerializer,
Server,
ServerError,
SimulationIntervalException,
TimedEventException,
Transport,
debugAndPrintError,
debugConnection,
debugDriver,
debugError,
debugMatchMaking,
debugMessage,
debugPatch,
debugPresence,
generateId,
getBearerToken,
getMessageBytes,
isDevMode,
logger,
matchMaker,
requestFromIPC,
spliceOne,
subscribeIPC,
subscribeLobby,
updateLobby,
...require("./matchmaker/driver/local/LocalDriver.js")
});