node-opcua-xml2json
Advanced tools
Comparing version 2.113.0 to 2.114.0
@@ -10,4 +10,4 @@ import { ReaderStateParserLike } from "./xml2json"; | ||
name?: UAString; | ||
description?: (LocalizedTextLike | null); | ||
dataType?: (NodeIdLike | null); | ||
description?: LocalizedTextLike | null; | ||
dataType?: NodeIdLike | null; | ||
valueRank?: Int32; | ||
@@ -14,0 +14,0 @@ arrayDimensions?: UInt32[] | null; |
@@ -15,4 +15,3 @@ "use strict"; | ||
init(name, attrs) { | ||
(0, node_opcua_assert_1.default)(!this.parent. | ||
nFields || this.parent.definitionFields.length === 0); | ||
(0, node_opcua_assert_1.default)(!this.parent.nFields || this.parent.definitionFields.length === 0); | ||
this.parent.definitionFields = []; | ||
@@ -64,3 +63,5 @@ this.parent.definitionName = attrs.SymbolicName || attrs.Name; | ||
} | ||
obj.isOptional = this.attrs.IsOptional === "true" ? true : false; | ||
if (this.attrs.IsOptional !== undefined) { | ||
obj.isOptional = this.attrs.IsOptional === "true" ? true : false; | ||
} | ||
if (this.attrs.SymbolicName !== undefined) { | ||
@@ -67,0 +68,0 @@ obj.symbolicName = this.attrs.SymbolicName; |
@@ -158,3 +158,3 @@ "use strict"; | ||
} | ||
return Object.assign({}, a); | ||
return { ...a }; | ||
} | ||
@@ -161,0 +161,0 @@ function _makeExtensionObjectReader(definitionName, definitionMap, readerMap) { |
{ | ||
"name": "node-opcua-xml2json", | ||
"version": "2.113.0", | ||
"version": "2.114.0", | ||
"description": "pure nodejs OPCUA SDK - module xml2json", | ||
@@ -17,3 +17,3 @@ "main": "dist/source/index.js", | ||
"node-opcua-assert": "2.105.0", | ||
"node-opcua-utils": "2.110.0", | ||
"node-opcua-utils": "2.114.0", | ||
"thenify": "^3.3.1", | ||
@@ -26,3 +26,3 @@ "xml-writer": "^1.7.0" | ||
"mocha": "^10.2.0", | ||
"node-opcua-debug": "2.113.0", | ||
"node-opcua-debug": "2.114.0", | ||
"node-opcua-nodesets": "2.110.0", | ||
@@ -44,3 +44,3 @@ "should": "^13.2.3" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "36db335391fedd39726990a1b37f7768da16466a", | ||
"gitHead": "358d284a696c88e383eedac1ab75d950fb28ec35", | ||
"files": [ | ||
@@ -47,0 +47,0 @@ "dist", |
@@ -20,3 +20,3 @@ //<Definition Name="SomeName"> | ||
// | ||
type UAString = string |null; | ||
type UAString = string | null; | ||
type NodeIdLike = string | null; | ||
@@ -29,9 +29,9 @@ type Int32 = number; | ||
export interface StructureFieldOptions { | ||
name?: UAString ; | ||
description?: (LocalizedTextLike | null); | ||
dataType?: (NodeIdLike | null); | ||
valueRank?: Int32 ; | ||
arrayDimensions?: UInt32 [] | null; | ||
maxStringLength?: UInt32 ; | ||
isOptional?: UABoolean ; | ||
name?: UAString; | ||
description?: LocalizedTextLike | null; | ||
dataType?: NodeIdLike | null; | ||
valueRank?: Int32; | ||
arrayDimensions?: UInt32[] | null; | ||
maxStringLength?: UInt32; | ||
isOptional?: UABoolean; | ||
} | ||
@@ -43,4 +43,3 @@ interface AA { | ||
definitionName: string; | ||
}, | ||
}; | ||
array: StructureFieldOptions[]; | ||
@@ -50,3 +49,3 @@ isUnion: boolean; | ||
interface FieldParser { | ||
description?: (LocalizedTextLike | null); | ||
description?: LocalizedTextLike | null; | ||
parent: AA; | ||
@@ -57,4 +56,3 @@ attrs: Record<string, string>; | ||
init(this: AA, name: string, attrs: XmlAttributes) { | ||
assert(!this.parent. | ||
nFields || this.parent.definitionFields.length === 0); | ||
assert(!this.parent.nFields || this.parent.definitionFields.length === 0); | ||
this.parent.definitionFields = []; | ||
@@ -105,4 +103,5 @@ this.parent.definitionName = attrs.SymbolicName || attrs.Name; | ||
obj.isOptional = this.attrs.IsOptional === "true" ? true : false; | ||
if (this.attrs.IsOptional !== undefined) { | ||
obj.isOptional = this.attrs.IsOptional === "true" ? true : false; | ||
} | ||
if (this.attrs.SymbolicName !== undefined) { | ||
@@ -109,0 +108,0 @@ obj.symbolicName = this.attrs.SymbolicName; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
129520
2127
+ Addednode-opcua-utils@2.114.0(transitive)
- Removednode-opcua-utils@2.110.0(transitive)
Updatednode-opcua-utils@2.114.0