New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@colyseus/schema

Package Overview
Dependencies
Maintainers
1
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colyseus/schema - npm Package Compare versions

Comparing version 0.4.47 to 0.4.48

12

lib/codegen/languages/cpp.js

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

map(function (childType) { return "#include \"" + childType + ".hpp\""; }).
join("\n") + "\n\nusing namespace colyseus::schema;\n\n" + (namespace ? "namespace " + namespace + " {" : "") + "\nclass " + klass.name + " : public " + klass.extends + " {\npublic:\n" + klass.properties.map(function (prop) { return generateProperty(prop); }).join("\n") + "\n\n\t" + klass.name + "() {\n\t\tthis->_indexes = " + generateAllIndexes(allProperties) + ";\n\t\tthis->_types = " + generateAllTypes(allProperties) + ";\n\t\tthis->_childPrimitiveTypes = " + generateAllChildPrimitiveTypes(allProperties) + ";\n\t\tthis->_childSchemaTypes = " + generateAllChildSchemaTypes(allProperties) + ";\n\t}\n\nprotected:\n" + Object.keys(propertiesPerType).map(function (type) {
join("\n") + "\n\nusing namespace colyseus::schema;\n\n" + (namespace ? "namespace " + namespace + " {" : "") + "\nclass " + klass.name + " : public " + klass.extends + " {\npublic:\n" + klass.properties.map(function (prop) { return generateProperty(prop); }).join("\n") + "\n\n\t" + klass.name + "() {\n\t\tthis->_indexes = " + generateAllIndexes(allProperties) + ";\n\t\tthis->_types = " + generateAllTypes(allProperties) + ";\n\t\tthis->_childPrimitiveTypes = " + generateAllChildPrimitiveTypes(allProperties) + ";\n\t\tthis->_childSchemaTypes = " + generateAllChildSchemaTypes(allProperties) + ";\n\t}\n\n\t~" + klass.name + "() {\n\t\t" + generateDestructors(allProperties).join("\n\t\t") + "\n\t}\n\nprotected:\n" + Object.keys(propertiesPerType).map(function (type) {
return generateGettersAndSetters(klass, type, propertiesPerType[type]);

@@ -196,2 +196,12 @@ }).

}
function generateDestructors(properties) {
return properties.map(function (property, i) {
if (property.childType) {
return "delete this->" + property.name + ";";
}
else {
return null;
}
}).filter(function (r) { return r !== null; });
}
function getAllProperties(klass, allClasses) {

@@ -198,0 +208,0 @@ var properties = [];

2

package.json
{
"name": "@colyseus/schema",
"version": "0.4.47",
"version": "0.4.48",
"description": "Schema-based binary serializer / de-serializer.",

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

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