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

demrec

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

demrec - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

2

package.json
{
"name": "demrec",
"version": "4.0.0",
"version": "4.1.0",
"description": "Demo Recorder Renderer",

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

@@ -46,2 +46,10 @@ let fs = require('fs')

Object.defineProperty(DemRec.Events, 'add', {
value: function (events) {
let len = Object.keys(this).length
if (!Array.isArray(events)) events = [events]
for (let event of events) this[event] = len++
}
})
DemRec.prototype.setGame = function (app) {

@@ -102,3 +110,3 @@ this.game = {

DemRec.prototype.launch = async function () {
DemRec.prototype.launch = async function (silent = false) {
this.updateCustomFiles()

@@ -111,3 +119,3 @@

this.emit('log', { event: DemRec.Events.GAME_LAUNCH })
if (!silent) this.emit('log', { event: DemRec.Events.GAME_LAUNCH })

@@ -125,6 +133,8 @@ this.app = await svr.run(this.game, {

this.emit('log', { event: DemRec.Events.GAME_LAUNCH_END })
if (!silent) this.emit('log', { event: DemRec.Events.GAME_LAUNCH_END })
}
DemRec.prototype.record = async function (demo, arr, out) {
if (!this.app) throw new Error('Game not running!')
if (!out) throw new Error('No output directory provided!')

@@ -238,8 +248,8 @@ if (!fs.existsSync(out)) fs.mkdirSync(out)

DemRec.prototype.exit = async function () {
this.emit('log', { event: DemRec.Events.GAME_EXIT })
DemRec.prototype.exit = async function (silent = false) {
if (!silent) this.emit('log', { event: DemRec.Events.GAME_EXIT })
if (this.app) await this.app.exit()
await util.sleep(1234)
this.kill()
this.emit('log', { event: DemRec.Events.GAME_EXIT_END })
if (!silent) this.emit('log', { event: DemRec.Events.GAME_EXIT_END })
}

@@ -246,0 +256,0 @@

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