node-opcua-client-dynamic-extension-object 2.112.0 → 2.114.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/convert_data_type_definition_to_structuretype_schema.js +323 -348
- package/dist/convert_data_type_definition_to_structuretype_schema.js.map +1 -1
- package/dist/convert_structuretype_schema_to_structure_definition.js +1 -2
- package/dist/convert_structuretype_schema_to_structure_definition.js.map +1 -1
- package/dist/get_extension_object_constructor.js +13 -24
- package/dist/get_extension_object_constructor.js.map +1 -1
- package/dist/get_extra_data_type_manager.js +58 -74
- package/dist/get_extra_data_type_manager.js.map +1 -1
- package/dist/populate_data_type_manager.js +91 -104
- package/dist/populate_data_type_manager.js.map +1 -1
- package/dist/private/find_encodings.js +36 -47
- package/dist/private/find_encodings.js.map +1 -1
- package/dist/private/populate_data_type_manager_103.js +451 -482
- package/dist/private/populate_data_type_manager_103.js.map +1 -1
- package/dist/private/populate_data_type_manager_104.js +139 -160
- package/dist/private/populate_data_type_manager_104.js.map +1 -1
- package/dist/promote_opaque_structure.js +11 -22
- package/dist/promote_opaque_structure.js.map +1 -1
- package/dist/promote_opaque_structure_in_notification_data.js +22 -33
- package/dist/promote_opaque_structure_in_notification_data.js.map +1 -1
- package/dist/resolve_dynamic_extension_object.js +107 -127
- package/dist/resolve_dynamic_extension_object.js.map +1 -1
- package/package.json +17 -17
- package/source/private/populate_data_type_manager_103.ts +4 -3
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.resolveDynamicExtensionObject = exports.resolveOpaqueStructureInExtentionObject = void 0;
|
|
13
4
|
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
|
|
@@ -17,142 +8,131 @@ const node_opcua_debug_1 = require("node-opcua-debug");
|
|
|
17
8
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
18
9
|
const populate_data_type_manager_104_1 = require("./private/populate_data_type_manager_104");
|
|
19
10
|
const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename);
|
|
20
|
-
function getOrExtractConstructor(session, binaryEncodingNodeId, dataTypeManager) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
async function getOrExtractConstructor(session, binaryEncodingNodeId, dataTypeManager) {
|
|
12
|
+
const dataTypeFactory = dataTypeManager.getDataTypeFactoryForNamespace(binaryEncodingNodeId.namespace);
|
|
13
|
+
const Constructor = dataTypeFactory.getConstructor(binaryEncodingNodeId);
|
|
14
|
+
if (Constructor) {
|
|
15
|
+
return Constructor;
|
|
16
|
+
}
|
|
17
|
+
if (binaryEncodingNodeId.namespace === 0) {
|
|
18
|
+
throw new Error("Internal Error");
|
|
19
|
+
}
|
|
20
|
+
// need to extract it
|
|
21
|
+
const browseResult = await session.browse({
|
|
22
|
+
nodeId: binaryEncodingNodeId,
|
|
23
|
+
referenceTypeId: "HasEncoding",
|
|
24
|
+
browseDirection: node_opcua_data_model_1.BrowseDirection.Inverse,
|
|
25
|
+
includeSubtypes: false,
|
|
26
|
+
nodeClassMask: node_opcua_data_model_1.NodeClassMask.DataType,
|
|
27
|
+
resultMask: node_opcua_data_model_1.ResultMask.BrowseName
|
|
28
|
+
});
|
|
29
|
+
if (browseResult.statusCode.isNotGood() || browseResult.references.length !== 1) {
|
|
30
|
+
throw new Error("browse failed");
|
|
31
|
+
}
|
|
32
|
+
const r = browseResult.references[0];
|
|
33
|
+
const dataTypeNodeId = r.nodeId;
|
|
34
|
+
if (dataTypeFactory.getStructureInfoForDataType(dataTypeNodeId)) {
|
|
35
|
+
throw new Error("Internal Error: we are not expecting this dataType to be processed already " + dataTypeNodeId.toString());
|
|
36
|
+
}
|
|
37
|
+
await (0, populate_data_type_manager_104_1.readDataTypeDefinitionAndBuildType)(session, dataTypeNodeId, r.browseName.name, dataTypeFactory, {});
|
|
38
|
+
const structureInfo = dataTypeFactory.getStructureInfoForDataType(dataTypeNodeId);
|
|
39
|
+
if (!structureInfo.constructor) {
|
|
40
|
+
throw new Error("Cannot find constructor for abstract DataType");
|
|
41
|
+
}
|
|
42
|
+
return structureInfo.constructor;
|
|
43
|
+
}
|
|
44
|
+
async function resolveOpaqueStructureInExtentionObject(session, dataTypeManager, object) {
|
|
45
|
+
const schema = object.schema;
|
|
46
|
+
async function fixOpaqueStructureOnElement(element, field, data, args) {
|
|
47
|
+
if (element instanceof node_opcua_variant_1.Variant) {
|
|
48
|
+
await resolveDynamicExtensionObject(session, element, dataTypeManager);
|
|
49
|
+
return element;
|
|
29
50
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
nodeId: binaryEncodingNodeId,
|
|
33
|
-
referenceTypeId: "HasEncoding",
|
|
34
|
-
browseDirection: node_opcua_data_model_1.BrowseDirection.Inverse,
|
|
35
|
-
includeSubtypes: false,
|
|
36
|
-
nodeClassMask: node_opcua_data_model_1.NodeClassMask.DataType,
|
|
37
|
-
resultMask: node_opcua_data_model_1.ResultMask.BrowseName
|
|
38
|
-
});
|
|
39
|
-
if (browseResult.statusCode.isNotGood() || browseResult.references.length !== 1) {
|
|
40
|
-
throw new Error("browse failed");
|
|
51
|
+
if (!(element instanceof node_opcua_extension_object_1.OpaqueStructure)) {
|
|
52
|
+
return element;
|
|
41
53
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
const variant = new node_opcua_variant_1.Variant({ dataType: node_opcua_variant_1.DataType.ExtensionObject, value: element });
|
|
55
|
+
await resolveDynamicExtensionObject(session, variant, dataTypeManager);
|
|
56
|
+
return variant.value;
|
|
57
|
+
}
|
|
58
|
+
function fixOpaqueStructure(object, field, data, args) {
|
|
59
|
+
if (field.category === "complex" && !field.allowSubType) {
|
|
60
|
+
return;
|
|
46
61
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (!structureInfo.constructor) {
|
|
50
|
-
throw new Error("Cannot find constructor for abstract DataType");
|
|
62
|
+
if (field.category === "basic" && field.fieldType !== "Variant") {
|
|
63
|
+
return;
|
|
51
64
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
function resolveOpaqueStructureInExtentionObject(session, dataTypeManager, object) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const schema = object.schema;
|
|
58
|
-
function fixOpaqueStructureOnElement(element, field, data, args) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
if (element instanceof node_opcua_variant_1.Variant) {
|
|
61
|
-
yield resolveDynamicExtensionObject(session, element, dataTypeManager);
|
|
62
|
-
return element;
|
|
63
|
-
}
|
|
64
|
-
if (!(element instanceof node_opcua_extension_object_1.OpaqueStructure)) {
|
|
65
|
-
return element;
|
|
66
|
-
}
|
|
67
|
-
const variant = new node_opcua_variant_1.Variant({ dataType: node_opcua_variant_1.DataType.ExtensionObject, value: element });
|
|
68
|
-
yield resolveDynamicExtensionObject(session, variant, dataTypeManager);
|
|
69
|
-
return variant.value;
|
|
70
|
-
});
|
|
65
|
+
const a = object[field.name];
|
|
66
|
+
if (!a) {
|
|
67
|
+
return;
|
|
71
68
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
const a = object[field.name];
|
|
80
|
-
if (!a) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (field.isArray) {
|
|
84
|
-
for (let i = 0; i < a.length; i++) {
|
|
85
|
-
const x = a[i];
|
|
86
|
-
promises.push((() => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
a[i] = yield fixOpaqueStructureOnElement(x, field, data, args);
|
|
88
|
-
}))());
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
promises.push((() => __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
object[field.name] = yield fixOpaqueStructureOnElement(a, field, data, args);
|
|
94
|
-
}))());
|
|
69
|
+
if (field.isArray) {
|
|
70
|
+
for (let i = 0; i < a.length; i++) {
|
|
71
|
+
const x = a[i];
|
|
72
|
+
promises.push((async () => {
|
|
73
|
+
a[i] = await fixOpaqueStructureOnElement(x, field, data, args);
|
|
74
|
+
})());
|
|
95
75
|
}
|
|
96
76
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
77
|
+
else {
|
|
78
|
+
promises.push((async () => {
|
|
79
|
+
object[field.name] = await fixOpaqueStructureOnElement(a, field, data, args);
|
|
80
|
+
})());
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const promises = [];
|
|
84
|
+
object.applyOnAllFields(fixOpaqueStructure, { dataTypeManager, promises });
|
|
85
|
+
await Promise.all(promises);
|
|
101
86
|
}
|
|
102
87
|
exports.resolveOpaqueStructureInExtentionObject = resolveOpaqueStructureInExtentionObject;
|
|
103
|
-
function resolveDynamicExtensionObjectV(session, opaque, dataTypeManager) {
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
async function resolveDynamicExtensionObjectV(session, opaque, dataTypeManager) {
|
|
89
|
+
try {
|
|
90
|
+
const Constructor = await getOrExtractConstructor(session, opaque.nodeId, dataTypeManager);
|
|
91
|
+
const object = new Constructor();
|
|
92
|
+
const stream = new node_opcua_binary_stream_1.BinaryStream(opaque.buffer);
|
|
106
93
|
try {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
try {
|
|
111
|
-
object.decode(stream);
|
|
112
|
-
yield resolveOpaqueStructureInExtentionObject(session, dataTypeManager, object);
|
|
113
|
-
return object;
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
warningLog("Constructor = ", Constructor.name);
|
|
117
|
-
warningLog("opaqueStructure = ", (_a = opaque === null || opaque === void 0 ? void 0 : opaque.nodeId) === null || _a === void 0 ? void 0 : _a.toString());
|
|
118
|
-
warningLog("opaqueStructure = ", (0, node_opcua_debug_1.hexDump)(opaque.buffer, 132, 100));
|
|
119
|
-
warningLog((0, node_opcua_debug_1.hexDump)(opaque.buffer));
|
|
120
|
-
warningLog("resolveDynamicExtensionObjectV err = ", err);
|
|
121
|
-
// try again for debugging
|
|
122
|
-
object.decode(stream);
|
|
123
|
-
return opaque;
|
|
124
|
-
}
|
|
94
|
+
object.decode(stream);
|
|
95
|
+
await resolveOpaqueStructureInExtentionObject(session, dataTypeManager, object);
|
|
96
|
+
return object;
|
|
125
97
|
}
|
|
126
98
|
catch (err) {
|
|
127
|
-
warningLog("
|
|
128
|
-
warningLog("opaqueStructure = ", opaque
|
|
129
|
-
warningLog("opaqueStructure = ",
|
|
99
|
+
warningLog("Constructor = ", Constructor.name);
|
|
100
|
+
warningLog("opaqueStructure = ", opaque?.nodeId?.toString());
|
|
101
|
+
warningLog("opaqueStructure = ", (0, node_opcua_debug_1.hexDump)(opaque.buffer, 132, 100));
|
|
130
102
|
warningLog((0, node_opcua_debug_1.hexDump)(opaque.buffer));
|
|
131
|
-
warningLog(
|
|
132
|
-
|
|
103
|
+
warningLog("resolveDynamicExtensionObjectV err = ", err);
|
|
104
|
+
// try again for debugging
|
|
105
|
+
object.decode(stream);
|
|
106
|
+
return opaque;
|
|
133
107
|
}
|
|
134
|
-
}
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
warningLog("err", err);
|
|
111
|
+
warningLog("opaqueStructure = ", opaque.nodeId.toString());
|
|
112
|
+
warningLog("opaqueStructure = ", "0x" + (0, node_opcua_debug_1.hexDump)(opaque.buffer, 132, 100));
|
|
113
|
+
warningLog((0, node_opcua_debug_1.hexDump)(opaque.buffer));
|
|
114
|
+
warningLog(dataTypeManager.toString());
|
|
115
|
+
throw err;
|
|
116
|
+
}
|
|
135
117
|
}
|
|
136
|
-
function resolveDynamicExtensionObject(session, variant, dataTypeManager) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (variant.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
variant.value[i] = yield resolveDynamicExtensionObjectV(session, variant.value[i], dataTypeManager);
|
|
146
|
-
}
|
|
118
|
+
async function resolveDynamicExtensionObject(session, variant, dataTypeManager) {
|
|
119
|
+
if (variant.dataType !== node_opcua_variant_1.DataType.ExtensionObject) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (variant.arrayType !== node_opcua_variant_1.VariantArrayType.Scalar) {
|
|
123
|
+
if (variant.value instanceof Array) {
|
|
124
|
+
for (let i = 0; i < variant.value.length; i++) {
|
|
125
|
+
if (variant.value[i] instanceof node_opcua_extension_object_1.OpaqueStructure) {
|
|
126
|
+
variant.value[i] = await resolveDynamicExtensionObjectV(session, variant.value[i], dataTypeManager);
|
|
147
127
|
}
|
|
148
128
|
}
|
|
149
|
-
return;
|
|
150
129
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (!(variant.value instanceof node_opcua_extension_object_1.OpaqueStructure)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
variant.value = await resolveDynamicExtensionObjectV(session, variant.value, dataTypeManager);
|
|
156
136
|
}
|
|
157
137
|
exports.resolveDynamicExtensionObject = resolveDynamicExtensionObject;
|
|
158
138
|
//# sourceMappingURL=resolve_dynamic_extension_object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve_dynamic_extension_object.js","sourceRoot":"","sources":["../source/resolve_dynamic_extension_object.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve_dynamic_extension_object.js","sourceRoot":"","sources":["../source/resolve_dynamic_extension_object.ts"],"names":[],"mappings":";;;AAAA,uEAAwD;AACxD,6EAA+E;AAC/E,2DAAyE;AACzE,uDAA4D;AAI5D,iEAAmF;AAGnF,6FAA8F;AAE9F,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,UAAU,CAAC,CAAC;AAE/C,KAAK,UAAU,uBAAuB,CAClC,OAAsB,EACtB,oBAA4B,EAC5B,eAAqC;IAErC,MAAM,eAAe,GAAG,eAAe,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAEvG,MAAM,WAAW,GAAG,eAAe,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;IACzE,IAAI,WAAW,EAAE;QACb,OAAO,WAAW,CAAC;KACtB;IACD,IAAI,oBAAoB,CAAC,SAAS,KAAK,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACrC;IACD,qBAAqB;IACrB,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC;QACtC,MAAM,EAAE,oBAAoB;QAC5B,eAAe,EAAE,aAAa;QAC9B,eAAe,EAAE,uCAAe,CAAC,OAAO;QACxC,eAAe,EAAE,KAAK;QACtB,aAAa,EAAE,qCAAa,CAAC,QAAQ;QACrC,UAAU,EAAE,kCAAU,CAAC,UAAU;KACpC,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,YAAY,CAAC,UAAW,CAAC,MAAM,KAAK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",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module client-dynamic-extension-object",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"chalk": "4.1.2",
|
|
14
14
|
"node-opcua-assert": "2.105.0",
|
|
15
|
-
"node-opcua-binary-stream": "2.
|
|
16
|
-
"node-opcua-constants": "2.
|
|
17
|
-
"node-opcua-data-model": "2.
|
|
18
|
-
"node-opcua-data-value": "2.
|
|
19
|
-
"node-opcua-debug": "2.
|
|
20
|
-
"node-opcua-extension-object": "2.
|
|
21
|
-
"node-opcua-factory": "2.
|
|
22
|
-
"node-opcua-nodeid": "2.
|
|
23
|
-
"node-opcua-pseudo-session": "2.
|
|
24
|
-
"node-opcua-schemas": "2.
|
|
25
|
-
"node-opcua-service-browse": "2.
|
|
26
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
27
|
-
"node-opcua-status-code": "2.
|
|
28
|
-
"node-opcua-types": "2.
|
|
29
|
-
"node-opcua-variant": "2.
|
|
15
|
+
"node-opcua-binary-stream": "2.114.0",
|
|
16
|
+
"node-opcua-constants": "2.114.0",
|
|
17
|
+
"node-opcua-data-model": "2.114.0",
|
|
18
|
+
"node-opcua-data-value": "2.114.0",
|
|
19
|
+
"node-opcua-debug": "2.114.0",
|
|
20
|
+
"node-opcua-extension-object": "2.114.0",
|
|
21
|
+
"node-opcua-factory": "2.114.0",
|
|
22
|
+
"node-opcua-nodeid": "2.114.0",
|
|
23
|
+
"node-opcua-pseudo-session": "2.114.0",
|
|
24
|
+
"node-opcua-schemas": "2.114.0",
|
|
25
|
+
"node-opcua-service-browse": "2.114.0",
|
|
26
|
+
"node-opcua-service-translate-browse-path": "2.114.0",
|
|
27
|
+
"node-opcua-status-code": "2.114.0",
|
|
28
|
+
"node-opcua-types": "2.114.0",
|
|
29
|
+
"node-opcua-variant": "2.114.0"
|
|
30
30
|
},
|
|
31
31
|
"author": "Etienne Rossignon",
|
|
32
32
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"internet of things"
|
|
44
44
|
],
|
|
45
45
|
"homepage": "http://node-opcua.github.io/",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "358d284a696c88e383eedac1ab75d950fb28ec35",
|
|
47
47
|
"files": [
|
|
48
48
|
"dist",
|
|
49
49
|
"source"
|
|
@@ -306,6 +306,7 @@ async function _extractDataTypeDictionaryFromDefinition(
|
|
|
306
306
|
}
|
|
307
307
|
// to do put in logical order
|
|
308
308
|
const dataTypeDefinitionsSorted = sortStructure(dataTypeDefinitions);
|
|
309
|
+
// istanbul ignore next
|
|
309
310
|
if (doDebug) {
|
|
310
311
|
debugLog("order ", dataTypeDefinitionsSorted.map((a) => a.className + " " + a.dataTypeNodeId).join(" -> "));
|
|
311
312
|
}
|
|
@@ -475,9 +476,7 @@ async function _exploreDataTypeDefinition(
|
|
|
475
476
|
const ref = references[i];
|
|
476
477
|
const binaryEncoding = binaryEncodingNodeIds[i];
|
|
477
478
|
const name = ref.browseName!.name!.toString();
|
|
478
|
-
|
|
479
|
-
debugLog(" type ", name.padEnd(30, " "), binaryEncoding.toString());
|
|
480
|
-
}
|
|
479
|
+
debugLog(" type ", name.padEnd(30, " "), binaryEncoding.toString());
|
|
481
480
|
// let's verify that constructor is operational
|
|
482
481
|
try {
|
|
483
482
|
const Constructor = dataTypeFactory.getStructureInfoByTypeName(name).constructor;
|
|
@@ -578,6 +577,7 @@ export async function populateDataTypeManager103(session: IBasicSession, dataTyp
|
|
|
578
577
|
};
|
|
579
578
|
const result = await browseAll(session, nodeToBrowse);
|
|
580
579
|
|
|
580
|
+
// istanbul ignore next
|
|
581
581
|
if (doDebug) {
|
|
582
582
|
debugLog(result.statusCode.toString());
|
|
583
583
|
debugLog(result.references?.map((r: any) => r.browseName?.toString()).join(" "));
|
|
@@ -617,6 +617,7 @@ export async function populateDataTypeManager103(session: IBasicSession, dataTyp
|
|
|
617
617
|
infos.push(info);
|
|
618
618
|
|
|
619
619
|
if (!isDictionaryDeprecated && rawSchema.length > 0) {
|
|
620
|
+
// istanbul ignore next
|
|
620
621
|
if (doDebug) {
|
|
621
622
|
debugLog("schema", rawSchema);
|
|
622
623
|
}
|