node-opcua-address-space 2.131.0 → 2.132.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/generateAddressSpaceRaw.js +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +1 -5
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +4 -4
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/tsconfig_common.tsbuildinfo +1 -1
- package/package.json +24 -24
- package/source/loader/generateAddressSpaceRaw.ts +2 -2
- package/src/alarms_and_conditions/condition.ts +2 -2
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +1 -2
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +5 -5
- package/src/alarms_and_conditions/ua_condition_impl.ts +3 -3
- package/src/nodeset_tools/nodeset_to_xml.ts +5 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.132.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",
|
|
@@ -22,35 +22,35 @@
|
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
|
-
"node-opcua-address-space-base": "2.
|
|
25
|
+
"node-opcua-address-space-base": "2.132.0",
|
|
26
26
|
"node-opcua-assert": "2.120.0",
|
|
27
|
-
"node-opcua-basic-types": "2.
|
|
27
|
+
"node-opcua-basic-types": "2.132.0",
|
|
28
28
|
"node-opcua-binary-stream": "2.128.0",
|
|
29
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
29
|
+
"node-opcua-client-dynamic-extension-object": "2.132.0",
|
|
30
30
|
"node-opcua-constants": "2.125.0",
|
|
31
31
|
"node-opcua-crypto": "4.9.4",
|
|
32
|
-
"node-opcua-data-access": "2.
|
|
33
|
-
"node-opcua-data-model": "2.
|
|
34
|
-
"node-opcua-data-value": "2.
|
|
35
|
-
"node-opcua-date-time": "2.
|
|
32
|
+
"node-opcua-data-access": "2.132.0",
|
|
33
|
+
"node-opcua-data-model": "2.132.0",
|
|
34
|
+
"node-opcua-data-value": "2.132.0",
|
|
35
|
+
"node-opcua-date-time": "2.132.0",
|
|
36
36
|
"node-opcua-debug": "2.128.0",
|
|
37
37
|
"node-opcua-enum": "2.128.0",
|
|
38
|
-
"node-opcua-extension-object": "2.
|
|
39
|
-
"node-opcua-factory": "2.
|
|
38
|
+
"node-opcua-extension-object": "2.132.0",
|
|
39
|
+
"node-opcua-factory": "2.132.0",
|
|
40
40
|
"node-opcua-nodeid": "2.128.0",
|
|
41
|
-
"node-opcua-nodeset-ua": "2.
|
|
42
|
-
"node-opcua-numeric-range": "2.
|
|
41
|
+
"node-opcua-nodeset-ua": "2.132.0",
|
|
42
|
+
"node-opcua-numeric-range": "2.132.0",
|
|
43
43
|
"node-opcua-object-registry": "2.128.0",
|
|
44
|
-
"node-opcua-pseudo-session": "2.
|
|
45
|
-
"node-opcua-service-browse": "2.
|
|
46
|
-
"node-opcua-service-call": "2.
|
|
47
|
-
"node-opcua-service-history": "2.
|
|
48
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
49
|
-
"node-opcua-service-write": "2.
|
|
44
|
+
"node-opcua-pseudo-session": "2.132.0",
|
|
45
|
+
"node-opcua-service-browse": "2.132.0",
|
|
46
|
+
"node-opcua-service-call": "2.132.0",
|
|
47
|
+
"node-opcua-service-history": "2.132.0",
|
|
48
|
+
"node-opcua-service-translate-browse-path": "2.132.0",
|
|
49
|
+
"node-opcua-service-write": "2.132.0",
|
|
50
50
|
"node-opcua-status-code": "2.128.0",
|
|
51
|
-
"node-opcua-types": "2.
|
|
51
|
+
"node-opcua-types": "2.132.0",
|
|
52
52
|
"node-opcua-utils": "2.128.0",
|
|
53
|
-
"node-opcua-variant": "2.
|
|
53
|
+
"node-opcua-variant": "2.132.0",
|
|
54
54
|
"node-opcua-xml2json": "2.128.0",
|
|
55
55
|
"semver": "^7.6.3",
|
|
56
56
|
"set-prototype-of": "^1.0.0",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"node-opcua-benchmarker": "2.128.0",
|
|
62
62
|
"node-opcua-leak-detector": "2.128.0",
|
|
63
63
|
"node-opcua-nodesets": "2.121.0",
|
|
64
|
-
"node-opcua-packet-analyzer": "2.
|
|
65
|
-
"node-opcua-service-filter": "2.
|
|
66
|
-
"node-opcua-test-fixtures": "2.
|
|
64
|
+
"node-opcua-packet-analyzer": "2.132.0",
|
|
65
|
+
"node-opcua-service-filter": "2.132.0",
|
|
66
|
+
"node-opcua-test-fixtures": "2.132.0",
|
|
67
67
|
"source-map-support": "^0.5.21"
|
|
68
68
|
},
|
|
69
69
|
"author": "Etienne Rossignon",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"internet of things"
|
|
82
82
|
],
|
|
83
83
|
"homepage": "http://node-opcua.github.io/",
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "5fab0f1eac0e59abf94bab9034035aec44890456",
|
|
85
85
|
"files": [
|
|
86
86
|
"dist",
|
|
87
87
|
"distHelpers",
|
|
@@ -2,7 +2,7 @@ import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
|
2
2
|
import { CallbackT } from "node-opcua-status-code";
|
|
3
3
|
import { IAddressSpace, RequiredModel } from "node-opcua-address-space-base";
|
|
4
4
|
import { ReaderStateParserLike, Xml2Json } from "node-opcua-xml2json";
|
|
5
|
-
import {
|
|
5
|
+
import { getMinOPCUADate } from "node-opcua-date-time";
|
|
6
6
|
import { adjustNamespaceArray } from "../../src/nodeset_tools/adjust_namespace_array";
|
|
7
7
|
import { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
|
|
8
8
|
import { NamespacePrivate } from "../../src/namespace_private";
|
|
@@ -85,7 +85,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
85
85
|
models.push({
|
|
86
86
|
modelUri: namespaceUris[0],
|
|
87
87
|
version: "1",
|
|
88
|
-
publicationDate:
|
|
88
|
+
publicationDate: getMinOPCUADate(),
|
|
89
89
|
requiredModel: []
|
|
90
90
|
});
|
|
91
91
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
require("set-prototype-of");
|
|
5
5
|
import { assert } from "node-opcua-assert";
|
|
6
6
|
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
7
|
-
import {
|
|
7
|
+
import { getMinOPCUADate } from "node-opcua-basic-types";
|
|
8
8
|
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
9
9
|
import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
10
10
|
import { ConditionSnapshotImpl } from "./condition_snapshot_impl";
|
|
@@ -30,7 +30,7 @@ export function _setAckedState(
|
|
|
30
30
|
// tslint:disable:max-classes-per-file
|
|
31
31
|
function prepare_date(sourceTimestamp: { value: Date } | null) {
|
|
32
32
|
if (!sourceTimestamp || !sourceTimestamp.value) {
|
|
33
|
-
return
|
|
33
|
+
return getMinOPCUADate();
|
|
34
34
|
}
|
|
35
35
|
assert(sourceTimestamp.value instanceof Date);
|
|
36
36
|
return sourceTimestamp;
|
|
@@ -542,8 +542,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
542
542
|
* @param time {Date} : UTCTime
|
|
543
543
|
*/
|
|
544
544
|
public setReceiveTime(time: UtcTime): void {
|
|
545
|
-
|
|
546
|
-
return this._set_var("ReceiveTime", DataType.DateTime, time, { sourceTimestamp: time });
|
|
545
|
+
return this._set_var("ReceiveTime", DataType.DateTime, time, { sourceTimestamp: time || undefined });
|
|
547
546
|
}
|
|
548
547
|
|
|
549
548
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
4
|
import { Certificate, exploreCertificate, makeSHA1Thumbprint } from "node-opcua-crypto";
|
|
5
|
-
import { DateTime,
|
|
5
|
+
import { DateTime, getMinOPCUADate, isMinDate, StatusCodes } from "node-opcua-basic-types";
|
|
6
6
|
import { make_warningLog } from "node-opcua-debug";
|
|
7
7
|
import { NodeId } from "node-opcua-nodeid";
|
|
8
8
|
import { DataType, Variant, VariantOptions } from "node-opcua-variant";
|
|
@@ -97,7 +97,7 @@ class UACertificateExpirationAlarmImpl extends UASystemOffNormalAlarmImpl implem
|
|
|
97
97
|
|
|
98
98
|
const certificate = this.getCertificate();
|
|
99
99
|
|
|
100
|
-
if (!expirationDate || (expirationDate
|
|
100
|
+
if (!expirationDate || (isMinDate(expirationDate) && !certificate)) {
|
|
101
101
|
if (!this.currentBranch() || this.currentBranch().getActiveState()) {
|
|
102
102
|
this.updateAlarmState2(true, 255, "certificate is missing");
|
|
103
103
|
}
|
|
@@ -163,13 +163,13 @@ class UACertificateExpirationAlarmImpl extends UASystemOffNormalAlarmImpl implem
|
|
|
163
163
|
private _extractAndSetExpiryDate(certificate: Certificate | null): void {
|
|
164
164
|
if (certificate && certificate.length > 0) {
|
|
165
165
|
const info = exploreCertificate(certificate);
|
|
166
|
-
if (info.tbsCertificate.validity.notAfter
|
|
166
|
+
if (info.tbsCertificate.validity.notAfter) {
|
|
167
167
|
this.setExpirationDate(info.tbsCertificate.validity.notAfter);
|
|
168
168
|
} else {
|
|
169
|
-
this.setExpirationDate(
|
|
169
|
+
this.setExpirationDate(getMinOPCUADate());
|
|
170
170
|
}
|
|
171
171
|
} else {
|
|
172
|
-
this.setExpirationDate(
|
|
172
|
+
this.setExpirationDate(getMinOPCUADate());
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
QualifiedName
|
|
19
19
|
} from "node-opcua-data-model";
|
|
20
20
|
import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
21
|
-
import {
|
|
21
|
+
import { getMinOPCUADate } from "node-opcua-basic-types";
|
|
22
22
|
import { coerceNodeId, makeNodeId, NodeId, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
23
23
|
import { CallbackT, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
24
24
|
import { CallMethodResultOptions, TimeZoneDataType } from "node-opcua-types";
|
|
@@ -997,8 +997,8 @@ function UACondition_instantiate(
|
|
|
997
997
|
);
|
|
998
998
|
branch0.setMessage("");
|
|
999
999
|
|
|
1000
|
-
branch0.setReceiveTime(
|
|
1001
|
-
branch0.setTime(
|
|
1000
|
+
branch0.setReceiveTime(getMinOPCUADate());
|
|
1001
|
+
branch0.setTime(getMinOPCUADate());
|
|
1002
1002
|
|
|
1003
1003
|
return conditionNode;
|
|
1004
1004
|
}
|
|
@@ -17,13 +17,12 @@ import {
|
|
|
17
17
|
makeAccessLevelFlag,
|
|
18
18
|
QualifiedName
|
|
19
19
|
} from "node-opcua-data-model";
|
|
20
|
-
import {
|
|
20
|
+
import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
|
|
21
21
|
import { lowerFirstLetter, isNullOrUndefined } from "node-opcua-utils";
|
|
22
22
|
import { Variant, VariantArrayType, DataType } from "node-opcua-variant";
|
|
23
23
|
import {
|
|
24
24
|
IAddressSpace,
|
|
25
25
|
BaseNode,
|
|
26
|
-
INamespace,
|
|
27
26
|
UADataType,
|
|
28
27
|
UAMethod,
|
|
29
28
|
UAObject,
|
|
@@ -33,10 +32,10 @@ import {
|
|
|
33
32
|
UAVariableType,
|
|
34
33
|
UAView
|
|
35
34
|
} from "node-opcua-address-space-base";
|
|
36
|
-
import { AttributeIds, Int64,
|
|
35
|
+
import { AttributeIds, Int64, isMinDate, StatusCode } from "node-opcua-basic-types";
|
|
37
36
|
import { BrowseDescription, EnumDefinition, StructureDefinition, StructureType } from "node-opcua-types";
|
|
38
37
|
|
|
39
|
-
import {
|
|
38
|
+
import { XmlWriter } from "../../source/xml_writer";
|
|
40
39
|
import { ReferenceImpl } from "../reference_impl";
|
|
41
40
|
import { BaseNodeImpl, getReferenceType } from "../base_node_impl";
|
|
42
41
|
import { UAReferenceTypeImpl } from "../ua_reference_type_impl";
|
|
@@ -50,7 +49,7 @@ import { UAVariableTypeImpl } from "../ua_variable_type_impl";
|
|
|
50
49
|
import { SessionContext } from "../index_current";
|
|
51
50
|
import { UAViewImpl } from "../ua_view_impl";
|
|
52
51
|
|
|
53
|
-
import { DefinitionMap2
|
|
52
|
+
import { DefinitionMap2 } from "../../source/loader/make_xml_extension_object_parser";
|
|
54
53
|
import { makeDefinitionMap } from "../../source/loader/decode_xml_extension_object";
|
|
55
54
|
import {
|
|
56
55
|
_constructNamespaceTranslationTable,
|
|
@@ -558,7 +557,7 @@ function _isDefaultValue(value: Variant): boolean {
|
|
|
558
557
|
}
|
|
559
558
|
break;
|
|
560
559
|
case DataType.DateTime:
|
|
561
|
-
if (!value.value || value.value
|
|
560
|
+
if (!value.value || isMinDate(value.value)) {
|
|
562
561
|
return true;
|
|
563
562
|
}
|
|
564
563
|
break;
|