node-opcua-factory
Advanced tools
Comparing version 2.134.0 to 2.137.0
@@ -184,2 +184,8 @@ "use strict"; | ||
} | ||
if (fieldType === "DiagnosticInfo" && !field.isArray && value) { | ||
value = value.toString(data); | ||
str = fieldNameF + " " + fieldTypeF + ": " + chalk_1.default.green(value.toString(data)); | ||
data.lines.push(str); | ||
return; | ||
} | ||
function _dump_enumeration_value(self, field, data, value, fieldType) { | ||
@@ -186,0 +192,0 @@ const s = field.schema; |
@@ -105,3 +105,5 @@ "use strict"; | ||
function buildField(underConstructSchema, dataTypeFactory, fieldLight, _index) { | ||
const category = figureOutFieldCategory(fieldLight, dataTypeFactory); | ||
const category = (fieldLight.fieldType == underConstructSchema.name) | ||
? underConstructSchema.category | ||
: figureOutFieldCategory(fieldLight, dataTypeFactory); | ||
const schema = figureOutSchema(underConstructSchema, dataTypeFactory, fieldLight, category); | ||
@@ -141,3 +143,3 @@ /* istanbul ignore next */ | ||
this.baseType = options.baseType; | ||
this.category = types_1.FieldCategory.complex; | ||
this.category = options.category || types_1.FieldCategory.complex; | ||
this._dataTypeFactory = options.dataTypeFactory; | ||
@@ -144,0 +146,0 @@ if (this._dataTypeFactory.hasBuiltInType(options.name)) { |
{ | ||
"name": "node-opcua-factory", | ||
"version": "2.134.0", | ||
"version": "2.137.0", | ||
"description": "pure nodejs OPCUA SDK - module factory", | ||
@@ -42,3 +42,3 @@ "main": "./dist/index.js", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "ccb34926a3c195f6a7e66fca58a2f101858e78be", | ||
"gitHead": "e88e4f20d5436dd68084d2a6d447f170330b373d", | ||
"files": [ | ||
@@ -45,0 +45,0 @@ "dist", |
@@ -222,2 +222,8 @@ /* eslint-disable prefer-rest-params */ | ||
} | ||
if(fieldType === "DiagnosticInfo" && !field.isArray && value) { | ||
value = value.toString(data); | ||
str = fieldNameF + " " + fieldTypeF + ": " + chalk.green(value.toString(data)); | ||
data.lines.push(str); | ||
return; | ||
} | ||
@@ -224,0 +230,0 @@ function _dump_enumeration_value( |
@@ -31,3 +31,2 @@ /** | ||
const fieldType = field.fieldType; | ||
if (field.category) { | ||
@@ -90,3 +89,3 @@ return field.category; | ||
returnValue = dataTypeFactory.getStructuredTypeSchema(fieldTypeWithoutNS); | ||
// istanbul ignore next | ||
@@ -110,10 +109,10 @@ if (returnValue) { | ||
"Cannot find Schema for field with name " + | ||
field.name + | ||
" fieldTypeWithoutNS= " + | ||
fieldTypeWithoutNS + | ||
" with type " + | ||
field.fieldType + | ||
" category = " + | ||
category + | ||
JSON.stringify(field, null, "\t") | ||
field.name + | ||
" fieldTypeWithoutNS= " + | ||
fieldTypeWithoutNS + | ||
" with type " + | ||
field.fieldType + | ||
" category = " + | ||
category + | ||
JSON.stringify(field, null, "\t") | ||
); | ||
@@ -130,3 +129,8 @@ } | ||
): FieldType { | ||
const category = figureOutFieldCategory(fieldLight, dataTypeFactory); | ||
const category = | ||
(fieldLight.fieldType == underConstructSchema.name) | ||
? underConstructSchema.category | ||
: figureOutFieldCategory(fieldLight, dataTypeFactory); | ||
const schema = figureOutSchema(underConstructSchema, dataTypeFactory, fieldLight, category); | ||
@@ -138,9 +142,9 @@ | ||
"expecting a valid schema for field with name " + | ||
fieldLight.name + | ||
" with type " + | ||
fieldLight.fieldType + | ||
" category" + | ||
category + | ||
" at index" + | ||
_index | ||
fieldLight.name + | ||
" with type " + | ||
fieldLight.fieldType + | ||
" category" + | ||
category + | ||
" at index" + | ||
_index | ||
); | ||
@@ -196,3 +200,3 @@ } | ||
this.baseType = options.baseType; | ||
this.category = FieldCategory.complex; | ||
this.category = options.category || FieldCategory.complex; | ||
@@ -238,9 +242,9 @@ this._dataTypeFactory = options.dataTypeFactory; | ||
" field = " + | ||
f.name.padEnd(30) + | ||
" isArray= " + | ||
(f.isArray ? true : false) + | ||
" " + | ||
f.fieldType.toString().padEnd(30) + | ||
(f.switchBit !== undefined ? " switchBit " + f.switchBit : "") + | ||
(f.switchValue !== undefined ? " switchValue " + f.switchValue : "") | ||
f.name.padEnd(30) + | ||
" isArray= " + | ||
(f.isArray ? true : false) + | ||
" " + | ||
f.fieldType.toString().padEnd(30) + | ||
(f.switchBit !== undefined ? " switchBit " + f.switchBit : "") + | ||
(f.switchValue !== undefined ? " switchValue " + f.switchValue : "") | ||
); | ||
@@ -247,0 +251,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
246864
4571