@colyseus/core
Advanced tools
Comparing version 0.14.33 to 0.14.34
@@ -15,2 +15,7 @@ /// <reference types="node" /> | ||
/** | ||
* Display greeting message on server start. | ||
* Default: true | ||
*/ | ||
greet?: boolean; | ||
/** | ||
* Options below are now part of WebSocketTransport (@colyseus/ws-transport) | ||
@@ -34,2 +39,3 @@ * TODO: remove me on 0.15.0 | ||
protected processId: string; | ||
protected greet: boolean; | ||
private matchmakeRoute; | ||
@@ -36,0 +42,0 @@ private allowedRoomNameChars; |
@@ -26,8 +26,10 @@ 'use strict'; | ||
processId = Utils.generateId(); | ||
greet; | ||
matchmakeRoute = 'matchmake'; | ||
allowedRoomNameChars = /([a-zA-Z_\-0-9]+)/gi; | ||
constructor(options = {}) { | ||
const { gracefullyShutdown = true } = options; | ||
const { gracefullyShutdown = true, greet = true } = options; | ||
this.presence = options.presence || new LocalPresence.LocalPresence(); | ||
this.driver = options.driver || new index.LocalDriver(); | ||
this.greet = greet; | ||
// setup matchmaker | ||
@@ -80,2 +82,8 @@ MatchMaker.setup(this.presence, this.driver, this.processId); | ||
this.port = port; | ||
/** | ||
* Display greeting log | ||
*/ | ||
if (this.greet) { | ||
console.log(); | ||
} | ||
return new Promise((resolve, reject) => { | ||
@@ -82,0 +90,0 @@ this.transport.server?.on('error', (err) => reject(err)); |
{ | ||
"name": "@colyseus/core", | ||
"version": "0.14.33", | ||
"version": "0.14.34", | ||
"description": "Multiplayer Framework for Node.js.", | ||
@@ -36,2 +36,3 @@ "input": "./src/index.ts", | ||
"dependencies": { | ||
"@colyseus/greeting-banner": "^1.0.0", | ||
"@colyseus/schema": "^1.0.15", | ||
@@ -48,3 +49,3 @@ "@gamestdio/timer": "^1.3.0", | ||
}, | ||
"gitHead": "f3de94bdb7b5dcc954466eecbd66bc162ffa998e" | ||
"gitHead": "d7a378d80bdf9f4a8f7260c407ba2bb64c226832" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
578929
6035
79
8
+ Added@colyseus/greeting-banner@1.0.0(transitive)