node-opcua-factory
Advanced tools
Comparing version 0.4.2 to 0.4.6
{ | ||
"name": "node-opcua-factory", | ||
"version": "0.4.2", | ||
"version": "0.4.6", | ||
"description": "pure nodejs OPCUA SDK - module -factory", | ||
@@ -10,11 +10,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"node-opcua-assert": "^0.4.0", | ||
"node-opcua-basic-types": "^0.4.2", | ||
"node-opcua-binary-stream": "^0.4.2", | ||
"node-opcua-debug": "^0.4.2", | ||
"node-opcua-enum": "^0.4.2", | ||
"node-opcua-guid": "^0.4.0", | ||
"node-opcua-nodeid": "^0.4.2", | ||
"node-opcua-status-code": "^0.4.2", | ||
"node-opcua-utils": "^0.4.2", | ||
"node-opcua-assert": "^0.4.6", | ||
"node-opcua-basic-types": "^0.4.6", | ||
"node-opcua-binary-stream": "^0.4.6", | ||
"node-opcua-debug": "^0.4.6", | ||
"node-opcua-enum": "^0.4.6", | ||
"node-opcua-guid": "^0.4.6", | ||
"node-opcua-nodeid": "^0.4.6", | ||
"node-opcua-status-code": "^0.4.6", | ||
"node-opcua-utils": "^0.4.6", | ||
"underscore": "^1.9.1" | ||
@@ -39,3 +39,4 @@ }, | ||
], | ||
"homepage": "http://node-opcua.github.io/" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "537d2a1f4d88271c57389d8ed56d787cf67588d2" | ||
} |
@@ -403,3 +403,3 @@ "use strict"; | ||
if (field.isArray) { | ||
options[field.name] = f.map(value => jsonify(t,f,field,value)); | ||
options[field.name] = f.map(value => jsonify(t,value,field,value)); | ||
} else { | ||
@@ -406,0 +406,0 @@ options[field.name] = jsonify(t,f,field,f); |
@@ -140,8 +140,8 @@ "use strict"; | ||
/* istanbul ignore next */ | ||
if (invalid_options_fields.length > 0) { | ||
if (invalid_options_fields.length > 0) { | ||
console.log("expected schema", schema.name); | ||
console.log("schema", schema); | ||
console.log("possible_fields", possible_fields); | ||
console.log("invalid_options_fields= ", invalid_options_fields); | ||
display_trace_from_this_projet_only(); | ||
console.log("invalid_options_fields= ", invalid_options_fields); | ||
} | ||
@@ -151,2 +151,21 @@ if (invalid_options_fields.length !== 0) { | ||
} | ||
// check that fields that are supposed to be array are either null or array | ||
for(const field of schema.fields) { | ||
if (field.isArray) { | ||
const a = options[field.name]; | ||
if (a === undefined ||a === null ) { | ||
continue; | ||
} | ||
if(!(a instanceof Array)) { | ||
console.log("expected schema", schema.name); | ||
console.log("schema", schema); | ||
console.log("field ", field.name, " is supposed to be an array"); | ||
throw new Error(" Invalid array in field " + field.name); | ||
} | ||
} | ||
} | ||
return true; | ||
@@ -153,0 +172,0 @@ |
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
46150
1132
Updatednode-opcua-assert@^0.4.6
Updatednode-opcua-debug@^0.4.6
Updatednode-opcua-enum@^0.4.6
Updatednode-opcua-guid@^0.4.6
Updatednode-opcua-nodeid@^0.4.6
Updatednode-opcua-utils@^0.4.6