node-opcua-address-space 2.186.0 → 2.186.1

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.
@@ -7,7 +7,7 @@ import { assert } from "node-opcua-assert";
7
7
  import { coerceExpandedNodeId, NodeId, sameNodeId } from "node-opcua-nodeid";
8
8
  import { StatusCodes } from "node-opcua-status-code";
9
9
  import { type BrowsePath, BrowsePathResult } from "node-opcua-types";
10
- import { lowerFirstLetter } from "node-opcua-utils";
10
+ import { lowerFirstLetter, setOwnProperty } from "node-opcua-utils";
11
11
  import { Variant, type VariantLike } from "node-opcua-variant";
12
12
  import type { EventField } from "./event_layout.js";
13
13
 
@@ -49,7 +49,7 @@ export class EventData implements IEventData {
49
49
  /** the value of one field of the layout */
50
50
  public _setField(field: EventField, variant: VariantLike): void {
51
51
  const value = Variant.coerce(variant);
52
- (this as Record<string, unknown>)[field.lowerName] = value;
52
+ setOwnProperty(this as Record<string, unknown>, field.lowerName, value);
53
53
  if (!this.#sharedPaths) {
54
54
  this.#pathToNodeId.set(field.fullBrowsePath, field.node.nodeId);
55
55
  }
@@ -3,6 +3,7 @@ import { assert } from "node-opcua-assert";
3
3
  import { NodeClass, type QualifiedName, type QualifiedNameOptions } from "node-opcua-data-model";
4
4
  import { make_debugLog, make_warningLog } from "node-opcua-debug";
5
5
  import { makeNodeId, NodeId, type NodeIdLike, NodeIdType, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
6
+ import { setOwnProperty } from "node-opcua-utils";
6
7
  import { BaseNodeImpl } from "./base_node_impl.js";
7
8
  import { type ReferenceImpl, resolveReferenceType } from "./reference_impl.js";
8
9
 
@@ -146,7 +147,7 @@ export class NodeIdManager {
146
147
  NodeClass
147
148
  ][];
148
149
  for (const [name, value, nodeClass] of symbols2) {
149
- this._cacheSymbolicName[name] = [value, nodeClass];
150
+ setOwnProperty(this._cacheSymbolicName, name, [value, nodeClass]);
150
151
  this._cacheSymbolicNameRev.add(value);
151
152
  }
152
153
  }
@@ -209,7 +210,10 @@ export class NodeIdManager {
209
210
  }
210
211
  const nodeId = this._constructNodeId(options);
211
212
  if (nodeId.identifierType === NodeIdType.NUMERIC && !cached) {
212
- this._cacheSymbolicName[fullName] = [nodeId.value as number, options.nodeClass || NodeClass.Unspecified];
213
+ setOwnProperty(this._cacheSymbolicName, fullName, [
214
+ nodeId.value as number,
215
+ options.nodeClass || NodeClass.Unspecified
216
+ ]);
213
217
  this._cacheSymbolicNameRev.add(nodeId.value as number);
214
218
  }
215
219
  return nodeId;
@@ -228,7 +232,10 @@ export class NodeIdManager {
228
232
  }
229
233
  const fullName = compose(fullParentName, prepareName(options.browseName));
230
234
  if (!this._cacheSymbolicName[fullName]) {
231
- this._cacheSymbolicName[fullName] = [nodeId.value as number, options.nodeClass || NodeClass.Unspecified];
235
+ setOwnProperty(this._cacheSymbolicName, fullName, [
236
+ nodeId.value as number,
237
+ options.nodeClass || NodeClass.Unspecified
238
+ ]);
232
239
  this._cacheSymbolicNameRev.add(nodeId.value as number);
233
240
  }
234
241
  }
@@ -45,7 +45,7 @@ import {
45
45
  type StructureDefinition,
46
46
  StructureType
47
47
  } from "node-opcua-types";
48
- import { isNullOrUndefined } from "node-opcua-utils";
48
+ import { isNullOrUndefined, setOwnProperty } from "node-opcua-utils";
49
49
  import { DataType, Variant, VariantArrayType, type VariantOptions } from "node-opcua-variant";
50
50
  import XMLWriter from "xml-writer";
51
51
  import { makeDefinitionMap } from "../../api/loader/decode_xml_extension_object.js";
@@ -274,14 +274,14 @@ class RecordExporter {
274
274
  if (nodeV.dataType && nodeV.dataType.value !== 0) {
275
275
  const dataTypeName = this.b(this.resolveDataTypeName(nodeV.dataType));
276
276
  if (dataTypeName && !aliases[dataTypeName]) {
277
- aliases[dataTypeName] = this.t(nodeV.dataType);
277
+ setOwnProperty(aliases, dataTypeName, this.t(nodeV.dataType));
278
278
  }
279
279
  }
280
280
  }
281
281
  for (const reference of node.allReferences()) {
282
282
  const key = this.b(getReferenceType(reference).browseName);
283
283
  // the XML export overwrites a reference-type alias each time it meets it; same value every time
284
- aliases[key] = this.t(reference.referenceType);
284
+ setOwnProperty(aliases, key, this.t(reference.referenceType));
285
285
  }
286
286
  }
287
287
 
@@ -21,6 +21,7 @@ import {
21
21
  type StructureFieldOptions,
22
22
  StructureType
23
23
  } from "node-opcua-types";
24
+ import { setOwnProperty } from "node-opcua-utils";
24
25
  import { DataType } from "node-opcua-variant";
25
26
  import type { ExtensionObjectConstructorFuncWithSchema } from "../api/interfaces/extension_object_constructor.js";
26
27
  import { SessionContext } from "../api/session_context.js";
@@ -279,7 +280,7 @@ export class UADataTypeImpl extends BaseNodeImpl implements UADataType {
279
280
  valueIndex: {}
280
281
  };
281
282
  for (const e of definition) {
282
- indexes.nameIndex[e.name] = e;
283
+ setOwnProperty(indexes.nameIndex, e.name, e);
283
284
  indexes.valueIndex[e.value] = e;
284
285
  }
285
286
  return indexes;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-opcua-address-space",
3
3
  "type": "module",
4
- "version": "2.186.0",
4
+ "version": "2.186.1",
5
5
  "description": "pure nodejs OPCUA SDK - module address-space",
6
6
  "main": "./dist/api/index.js",
7
7
  "types": "./dist/api/index.d.ts",
@@ -23,48 +23,48 @@
23
23
  "@types/semver": "7.8.0",
24
24
  "chalk": "4.1.2",
25
25
  "dequeue": "^1.0.5",
26
- "node-opcua-address-space-base": "2.186.0",
26
+ "node-opcua-address-space-base": "2.186.1",
27
27
  "node-opcua-assert": "2.184.0",
28
- "node-opcua-basic-types": "2.185.0",
29
- "node-opcua-binary-stream": "2.184.1",
30
- "node-opcua-client-dynamic-extension-object": "2.185.0",
28
+ "node-opcua-basic-types": "2.186.1",
29
+ "node-opcua-binary-stream": "2.186.1",
30
+ "node-opcua-client-dynamic-extension-object": "2.186.1",
31
31
  "node-opcua-constants": "2.185.0",
32
32
  "node-opcua-crypto": "6.0.0",
33
- "node-opcua-data-access": "2.185.0",
34
- "node-opcua-data-model": "2.185.0",
35
- "node-opcua-data-value": "2.185.0",
36
- "node-opcua-date-time": "2.184.1",
33
+ "node-opcua-data-access": "2.186.1",
34
+ "node-opcua-data-model": "2.186.1",
35
+ "node-opcua-data-value": "2.186.1",
36
+ "node-opcua-date-time": "2.186.1",
37
37
  "node-opcua-debug": "2.184.0",
38
- "node-opcua-enum": "2.184.1",
39
- "node-opcua-extension-object": "2.185.0",
40
- "node-opcua-factory": "2.185.0",
41
- "node-opcua-nodeid": "2.185.0",
42
- "node-opcua-nodeset-ua": "2.186.0",
43
- "node-opcua-numeric-range": "2.185.0",
38
+ "node-opcua-enum": "2.186.1",
39
+ "node-opcua-extension-object": "2.186.1",
40
+ "node-opcua-factory": "2.186.1",
41
+ "node-opcua-nodeid": "2.186.1",
42
+ "node-opcua-nodeset-ua": "2.186.1",
43
+ "node-opcua-numeric-range": "2.186.1",
44
44
  "node-opcua-object-registry": "2.184.0",
45
- "node-opcua-pseudo-session": "2.185.0",
46
- "node-opcua-service-browse": "2.185.0",
47
- "node-opcua-service-call": "2.185.0",
48
- "node-opcua-service-history": "2.185.0",
49
- "node-opcua-service-translate-browse-path": "2.185.0",
50
- "node-opcua-service-write": "2.185.0",
51
- "node-opcua-status-code": "2.184.1",
52
- "node-opcua-types": "2.185.0",
53
- "node-opcua-utils": "2.184.1",
54
- "node-opcua-variant": "2.185.0",
55
- "node-opcua-xml2json": "2.184.1",
45
+ "node-opcua-pseudo-session": "2.186.1",
46
+ "node-opcua-service-browse": "2.186.1",
47
+ "node-opcua-service-call": "2.186.1",
48
+ "node-opcua-service-history": "2.186.1",
49
+ "node-opcua-service-translate-browse-path": "2.186.1",
50
+ "node-opcua-service-write": "2.186.1",
51
+ "node-opcua-status-code": "2.186.1",
52
+ "node-opcua-types": "2.186.1",
53
+ "node-opcua-utils": "2.186.1",
54
+ "node-opcua-variant": "2.186.1",
55
+ "node-opcua-xml2json": "2.186.1",
56
56
  "semver": "^7.8.5",
57
57
  "thenify-ex": "4.4.0",
58
58
  "xml-writer": "^1.7.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "humanize": "0.0.9",
62
- "node-opcua-benchmarker": "2.184.1",
62
+ "node-opcua-benchmarker": "2.186.1",
63
63
  "node-opcua-leak-detector": "2.184.1",
64
64
  "node-opcua-nodesets": "2.185.0",
65
- "node-opcua-packet-analyzer": "2.185.0",
66
- "node-opcua-schemas": "2.185.0",
67
- "node-opcua-service-filter": "2.186.0",
65
+ "node-opcua-packet-analyzer": "2.186.1",
66
+ "node-opcua-schemas": "2.186.1",
67
+ "node-opcua-service-filter": "2.186.1",
68
68
  "node-opcua-test-fixtures": "2.184.0",
69
69
  "node-opcua-test-helpers": "2.184.0"
70
70
  },
@@ -83,7 +83,7 @@
83
83
  "internet of things"
84
84
  ],
85
85
  "homepage": "http://node-opcua.github.io/",
86
- "gitHead": "f39357ba4864bc83f210b40c7257e92afb0fa0ea",
86
+ "gitHead": "c4b15b4ca645101b2d656a75b2ea9a8a843d25b5",
87
87
  "files": [
88
88
  "dist",
89
89
  "distHelpers",