node-opcua-address-space 2.142.0 → 2.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/loader/decode_xml_extension_object.js +1 -1
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.js +2 -2
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.d.ts +3 -7
- package/dist/source/loader/load_nodeset2.js +13 -22
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/tsconfig_common.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/source/loader/decode_xml_extension_object.ts +1 -1
- package/source/loader/generateAddressSpaceRaw.ts +2 -2
- package/source/loader/load_nodeset2.ts +18 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.143.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"chalk": "4.1.2",
|
|
22
22
|
"dequeue": "^1.0.5",
|
|
23
23
|
"lodash": "4.17.21",
|
|
24
|
-
"node-opcua-address-space-base": "2.
|
|
24
|
+
"node-opcua-address-space-base": "2.143.0",
|
|
25
25
|
"node-opcua-assert": "2.139.0",
|
|
26
26
|
"node-opcua-basic-types": "2.139.0",
|
|
27
27
|
"node-opcua-binary-stream": "2.139.0",
|
|
28
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
28
|
+
"node-opcua-client-dynamic-extension-object": "2.143.0",
|
|
29
29
|
"node-opcua-constants": "2.139.0",
|
|
30
30
|
"node-opcua-crypto": "4.16.0",
|
|
31
|
-
"node-opcua-data-access": "2.
|
|
31
|
+
"node-opcua-data-access": "2.143.0",
|
|
32
32
|
"node-opcua-data-model": "2.139.0",
|
|
33
33
|
"node-opcua-data-value": "2.142.0",
|
|
34
34
|
"node-opcua-date-time": "2.139.0",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"node-opcua-extension-object": "2.139.0",
|
|
38
38
|
"node-opcua-factory": "2.139.0",
|
|
39
39
|
"node-opcua-nodeid": "2.139.0",
|
|
40
|
-
"node-opcua-nodeset-ua": "2.
|
|
40
|
+
"node-opcua-nodeset-ua": "2.143.0",
|
|
41
41
|
"node-opcua-numeric-range": "2.139.0",
|
|
42
42
|
"node-opcua-object-registry": "2.139.0",
|
|
43
|
-
"node-opcua-pseudo-session": "2.
|
|
44
|
-
"node-opcua-service-browse": "2.
|
|
45
|
-
"node-opcua-service-call": "2.
|
|
46
|
-
"node-opcua-service-history": "2.
|
|
47
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
48
|
-
"node-opcua-service-write": "2.
|
|
43
|
+
"node-opcua-pseudo-session": "2.143.0",
|
|
44
|
+
"node-opcua-service-browse": "2.143.0",
|
|
45
|
+
"node-opcua-service-call": "2.143.0",
|
|
46
|
+
"node-opcua-service-history": "2.143.0",
|
|
47
|
+
"node-opcua-service-translate-browse-path": "2.143.0",
|
|
48
|
+
"node-opcua-service-write": "2.143.0",
|
|
49
49
|
"node-opcua-status-code": "2.139.0",
|
|
50
|
-
"node-opcua-types": "2.
|
|
50
|
+
"node-opcua-types": "2.143.0",
|
|
51
51
|
"node-opcua-utils": "2.139.0",
|
|
52
52
|
"node-opcua-variant": "2.142.0",
|
|
53
|
-
"node-opcua-xml2json": "2.
|
|
54
|
-
"semver": "^7.
|
|
53
|
+
"node-opcua-xml2json": "2.143.0",
|
|
54
|
+
"semver": "^7.7.0",
|
|
55
55
|
"set-prototype-of": "^1.0.0",
|
|
56
|
-
"thenify-ex": "4.
|
|
56
|
+
"thenify-ex": "4.4.0",
|
|
57
57
|
"xml-writer": "^1.7.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"node-opcua-leak-detector": "2.139.0",
|
|
62
62
|
"node-opcua-nodesets": "2.139.0",
|
|
63
63
|
"node-opcua-packet-analyzer": "2.139.0",
|
|
64
|
-
"node-opcua-service-filter": "2.
|
|
65
|
-
"node-opcua-test-fixtures": "2.
|
|
64
|
+
"node-opcua-service-filter": "2.143.0",
|
|
65
|
+
"node-opcua-test-fixtures": "2.143.0",
|
|
66
66
|
"source-map-support": "^0.5.21"
|
|
67
67
|
},
|
|
68
68
|
"author": "Etienne Rossignon",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"internet of things"
|
|
81
81
|
],
|
|
82
82
|
"homepage": "http://node-opcua.github.io/",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "3bd85d4036f219f6f7e401d54e60afb3592ff1ba",
|
|
84
84
|
"files": [
|
|
85
85
|
"dist",
|
|
86
86
|
"distHelpers",
|
|
@@ -67,7 +67,7 @@ export function decodeXmlExtensionObject(
|
|
|
67
67
|
|
|
68
68
|
const reader = makeXmlExtensionObjectReader(dataType.nodeId, definitionMap, new Map(), translateNodeId);
|
|
69
69
|
const parser2 = new Xml2Json(reader);
|
|
70
|
-
const pojo = parser2.
|
|
70
|
+
const pojo = parser2.parseString(xmlBody);
|
|
71
71
|
|
|
72
72
|
const userDefinedExtensionObject = addressSpace.constructExtensionObject(dataType, pojo);
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
const parser = new Xml2Json(state0);
|
|
83
|
-
parser.
|
|
83
|
+
parser.parseString(xmlData);
|
|
84
84
|
if (models.length === 0 && namespaceUris.length >= 1) {
|
|
85
85
|
models.push({
|
|
86
86
|
modelUri: namespaceUris[0],
|
|
@@ -210,7 +210,7 @@ export async function generateAddressSpaceRaw(
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
await nodesetLoader.
|
|
213
|
+
await nodesetLoader.terminate();
|
|
214
214
|
adjustNamespaceArray(addressSpace);
|
|
215
215
|
// however process them in series
|
|
216
216
|
}
|
|
@@ -142,8 +142,8 @@ function makeDefaultVariant(
|
|
|
142
142
|
return variant;
|
|
143
143
|
}
|
|
144
144
|
export interface NodeSet2ParserEngine {
|
|
145
|
-
addNodeSet: (xmlData: string
|
|
146
|
-
terminate: (
|
|
145
|
+
addNodeSet: (xmlData: string) => Promise<void>;
|
|
146
|
+
terminate: () => Promise<void>;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLoaderOptions): NodeSet2ParserEngine {
|
|
@@ -229,8 +229,8 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
229
229
|
if (!namespace) {
|
|
230
230
|
throw new Error(
|
|
231
231
|
"cannot find namespace for " +
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
namespaceUri +
|
|
233
|
+
"\nplease make sure to initialize your address space with the corresponding nodeset files"
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
236
|
foundNamespaceMap.set(namespaceUri, namespace);
|
|
@@ -817,7 +817,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
817
817
|
browseName: convertQualifiedName(attrs.BrowseName),
|
|
818
818
|
parentNodeId: attrs.ParentNodeId || null,
|
|
819
819
|
nodeId: convertToNodeId(attrs.NodeId) || null,
|
|
820
|
-
methodDeclarationId: attrs.MethodDeclarationId ? _translateNodeId(attrs.MethodDeclarationId) : null
|
|
820
|
+
methodDeclarationId: attrs.MethodDeclarationId ? _translateNodeId(attrs.MethodDeclarationId) : null
|
|
821
821
|
};
|
|
822
822
|
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
823
823
|
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
@@ -971,7 +971,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
971
971
|
|
|
972
972
|
const parser = new Xml2Json(state_0);
|
|
973
973
|
|
|
974
|
-
function terminate(
|
|
974
|
+
async function terminate() {
|
|
975
975
|
make_back_references(addressSpace1);
|
|
976
976
|
|
|
977
977
|
// setting up Server_NamespaceArray
|
|
@@ -993,7 +993,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
993
993
|
doDebug &&
|
|
994
994
|
debugLog(
|
|
995
995
|
chalk.bgGreenBright("Performing post loading tasks -------------------------------------------") +
|
|
996
|
-
|
|
996
|
+
chalk.green("DONE")
|
|
997
997
|
);
|
|
998
998
|
|
|
999
999
|
async function performPostLoadingTasks(tasks: Task[]): Promise<void> {
|
|
@@ -1050,16 +1050,16 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1050
1050
|
doDebug && debugLog(chalk.bgGreenBright("Performing post variable initialization ---------------------"));
|
|
1051
1051
|
promoteObjectsAndVariables(addressSpace);
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1053
|
+
|
|
1054
|
+
try {
|
|
1055
|
+
await finalSteps();
|
|
1056
|
+
} catch (err) {
|
|
1057
|
+
renderError(err);
|
|
1058
|
+
}
|
|
1059
1059
|
}
|
|
1060
|
-
function addNodeSet(xmlData: string
|
|
1060
|
+
async function addNodeSet(xmlData: string): Promise<void> {
|
|
1061
1061
|
_reset_namespace_translation();
|
|
1062
|
-
parser.parseString(xmlData
|
|
1062
|
+
parser.parseString(xmlData);
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
1065
|
return {
|
|
@@ -1077,22 +1077,11 @@ export class NodeSetLoader {
|
|
|
1077
1077
|
this._s = makeNodeSetParserEngine(addressSpace, options || {});
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
|
-
addNodeSet(xmlData: string, callback: ErrorCallback): void {
|
|
1081
|
-
if (!callback) {
|
|
1082
|
-
throw new Error("Expecting callback function");
|
|
1083
|
-
}
|
|
1084
|
-
return this._s.addNodeSet(xmlData, callback);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
1080
|
async addNodeSetAsync(xmlData: string): Promise<void> {
|
|
1088
|
-
return
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
terminate(callback: ErrorCallback): void {
|
|
1092
|
-
this._s.terminate(callback);
|
|
1081
|
+
return await this._s.addNodeSet(xmlData);
|
|
1093
1082
|
}
|
|
1094
1083
|
|
|
1095
|
-
async
|
|
1096
|
-
|
|
1084
|
+
async terminate(): Promise<void> {
|
|
1085
|
+
await this._s.terminate();
|
|
1097
1086
|
}
|
|
1098
1087
|
}
|