Socket
Socket
Sign inDemoInstall

@soundworks/core

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soundworks/core - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

39

common/ParameterBag.js

@@ -261,2 +261,19 @@ "use strict";

sanitizeSchema: def => {
// sanitize `null` values in received schema, this prevent a bug when
// `min` and `max` are explicitely set to `±Infinity`, the schema is stringified
// when sent over the network and therefore Infinity is transformed to `null`
//
// JSON.parse({ a: Infinity });
// > { "a": null }
if (def.min === null) {
def.min = -Infinity;
}
if (def.max === null) {
def.max = Infinity;
}
return def;
},
coerceFunction: (name, def, value) => {

@@ -280,2 +297,19 @@ if (!(typeof value === 'number' && Math.floor(value) === value)) {

sanitizeSchema: def => {
// sanitize `null` values in received schema, this prevent a bug when
// `min` and `max` are explicitely set to `±Infinity`, the schema is stringified
// when sent over the network and therefore Infinity is transformed to `null`
//
// JSON.parse({ a: Infinity });
// > { "a": null }
if (def.min === null) {
def.min = -Infinity;
}
if (def.max === null) {
def.max = Infinity;
}
return def;
},
coerceFunction: (name, def, value) => {

@@ -390,2 +424,7 @@ if (typeof value !== 'number' || value !== value) {

} = types[def.type];
if (types[def.type].sanitizeSchema) {
def = types[def.type].sanitizeSchema(def);
}
def = Object.assign({}, defaultOptions, def); // if event property is set to true, the param must

@@ -392,0 +431,0 @@ // be nullable and its default value is `undefined`

2

common/SharedState.js

@@ -155,3 +155,3 @@ "use strict";

event
} = this._parameters.getSchema(name); // @note 20211209 - we have an issue here server-side, because if the value
} = this._parameters.getSchema(name); // @note 20211209 - we had an issue here server-side, because if the value
// is an object or an array, the reference is shared by everybody, therefore

@@ -158,0 +158,0 @@ // `changed` is always false and the new value is never propagated...

{
"name": "@soundworks/core",
"version": "3.3.2",
"version": "3.3.3",
"description": "full-stack javascript framework for distributed audio visual experiences on the web",

@@ -42,3 +42,2 @@ "authors": [

"fast-text-encoding": "^1.0.0",
"http-terminator": "^3.2.0",
"isomorphic-ws": "^4.0.1",

@@ -66,3 +65,4 @@ "keyv": "^4.2.2",

"markdown-toc": "^1.2.0",
"mocha": "^9.2.2"
"mocha": "^9.2.2",
"serial-mocha": "^0.0.4"
},

@@ -69,0 +69,0 @@ "optionalDependencies": {

@@ -44,4 +44,2 @@ "use strict";

var _httpTerminator = require("http-terminator");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -522,9 +520,9 @@

}
}
} // @todo - handle gracefull close of the server
async stop() {
const httpTerminator = (0, _httpTerminator.createHttpTerminator)({
server: this.httpServer
});
await httpTerminator.terminate();
this.sockets.terminate();
this.httpServer.close();
return Promise.resolve();
}

@@ -531,0 +529,0 @@ /**

@@ -84,2 +84,8 @@ "use strict";

}
terminate() {
const sockets = this._rooms.get('*');
sockets.forEach(socket => socket.terminate());
}
/** @private */

@@ -86,0 +92,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