Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leancloud/client-engine

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leancloud/client-engine - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

build/automation.js

@@ -50,4 +50,10 @@ "use strict";

super(...params);
const roomIsEmpty = () => {
if (!this.masterClient.room) {
return true;
}
return this.players.length + this.registeredPlayers.size === 0;
};
AutoDestroyGame.killerTimer
.pipe(operators_1.filter(() => this.players.length + this.registeredPlayers.size === 0), operators_1.take(2))
.pipe(operators_1.filter(roomIsEmpty), operators_1.take(2))
.toPromise()

@@ -54,0 +60,0 @@ .then(() => {

2

build/game.d.ts

@@ -48,2 +48,3 @@ /// <reference types="node" />

terminate(): Promise<any>;
destroy(): void;
/**

@@ -83,3 +84,2 @@ * 向玩家广播自定义事件。

}>;
protected destroy(): void;
}

@@ -86,0 +86,0 @@ export declare const GameEvent: {

@@ -65,2 +65,7 @@ "use strict";

}
destroy() {
// TODO: 直接调用 gameInstance.masterClient.close() 时不会触发 END 事件
this.masterClient.close();
this.emit(exports.GameEvent.END);
}
/**

@@ -109,6 +114,2 @@ * 向玩家广播自定义事件。

}
destroy() {
this.masterClient.close();
this.emit(exports.GameEvent.END);
}
}

@@ -115,0 +116,0 @@ exports.Game = Game;

{
"name": "@leancloud/client-engine",
"version": "1.0.0",
"version": "1.0.1",
"description": "Node.js SDK for LeanCloud ClientEngine",

@@ -5,0 +5,0 @@ "main": "build/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc