@colyseus/core
Version:
Multiplayer Framework for Node.js.
8 lines (7 loc) • 2.14 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../src/Debug.ts"],
"sourcesContent": ["import debug from 'debug';\nimport { logger } from './Logger.ts';\nimport { ServerError } from './errors/ServerError.ts';\n\nexport const debugConnection = debug('colyseus:connection');\ndebugConnection.log = console.debug.bind(console); // STDOUT\n\nexport const debugDriver = debug('colyseus:driver');\ndebugDriver.log = console.debug.bind(console); // STDOUT\n\nexport const debugMatchMaking = debug('colyseus:matchmaking');\ndebugMatchMaking.log = console.debug.bind(console); // STDOUT\n\nexport const debugMessage = debug('colyseus:message');\ndebugMessage.log = console.debug.bind(console); // STDOUT\n\nexport const debugPatch = debug('colyseus:patch');\ndebugPatch.log = console.debug.bind(console); // STDOUT\n\nexport const debugPresence = debug('colyseus:presence');\ndebugPresence.log = console.debug.bind(console); // STDOUT\n\nexport const debugError = debug('colyseus:errors');\ndebugError.log = console.error.bind(console); // STDERR\n\nexport const debugDevMode = debug('colyseus:devmode');\ndebugDevMode.log = console.debug.bind(console); // STDOUT\n\nexport const debugAndPrintError = (e: Error | string) => {\n const message = (e instanceof Error) ? e.stack : e;\n\n if (!(e instanceof ServerError)) {\n logger.error(message);\n }\n\n debugError.call(debugError, message);\n};\n"],
"mappings": ";AAAA,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAErB,IAAM,kBAAkB,MAAM,qBAAqB;AAC1D,gBAAgB,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEzC,IAAM,cAAc,MAAM,iBAAiB;AAClD,YAAY,MAAM,QAAQ,MAAM,KAAK,OAAO;AAErC,IAAM,mBAAmB,MAAM,sBAAsB;AAC5D,iBAAiB,MAAM,QAAQ,MAAM,KAAK,OAAO;AAE1C,IAAM,eAAe,MAAM,kBAAkB;AACpD,aAAa,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEtC,IAAM,aAAa,MAAM,gBAAgB;AAChD,WAAW,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEpC,IAAM,gBAAgB,MAAM,mBAAmB;AACtD,cAAc,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEvC,IAAM,aAAa,MAAM,iBAAiB;AACjD,WAAW,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEpC,IAAM,eAAe,MAAM,kBAAkB;AACpD,aAAa,MAAM,QAAQ,MAAM,KAAK,OAAO;AAEtC,IAAM,qBAAqB,CAAC,MAAsB;AACvD,QAAM,UAAW,aAAa,QAAS,EAAE,QAAQ;AAEjD,MAAI,EAAE,aAAa,cAAc;AAC/B,WAAO,MAAM,OAAO;AAAA,EACtB;AAEA,aAAW,KAAK,YAAY,OAAO;AACrC;",
"names": []
}