node-opcua-modeler 2.63.1 → 2.64.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.
Files changed (51) hide show
  1. package/MyModel.NodeSet2.xml +125 -0
  2. package/dist/addExtensionObjectDataType.d.ts +21 -21
  3. package/dist/addExtensionObjectDataType.js +130 -130
  4. package/dist/buildModel.d.ts +16 -0
  5. package/dist/buildModel.js +91 -0
  6. package/dist/buildModel.js.map +1 -0
  7. package/dist/build_model_inner.d.ts +17 -17
  8. package/dist/build_model_inner.js +40 -40
  9. package/dist/display.d.ts +2 -0
  10. package/dist/display.js +96 -0
  11. package/dist/display.js.map +1 -0
  12. package/dist/displayNodeElement.d.ts +5 -5
  13. package/dist/displayNodeElement.js +191 -156
  14. package/dist/displayNodeElement.js.map +1 -1
  15. package/dist/dump_state_machine_to_graphviz.d.ts +6 -0
  16. package/dist/dump_state_machine_to_graphviz.js +120 -0
  17. package/dist/dump_state_machine_to_graphviz.js.map +1 -0
  18. package/dist/generate_markdown_doc.d.ts +6 -6
  19. package/dist/generate_markdown_doc.js +266 -155
  20. package/dist/generate_markdown_doc.js.map +1 -1
  21. package/dist/index.d.ts +24 -24
  22. package/dist/index.js +48 -48
  23. package/dist/promoteToMandatory.d.ts +8 -8
  24. package/dist/promoteToMandatory.js +97 -97
  25. package/dist/setNamespaceMetaData.d.ts +1 -1
  26. package/dist/setNamespaceMetaData.js +5 -5
  27. package/dist/symbol.d.ts +1 -1
  28. package/dist/symbol.js +2 -2
  29. package/dist/tableHelper.d.ts +9 -9
  30. package/dist/tableHelper.js +60 -60
  31. package/dist/to_cvs.d.ts +2 -2
  32. package/dist/to_cvs.js +11 -11
  33. package/dist/to_graphivz.d.ts +14 -13
  34. package/dist/to_graphivz.js +294 -235
  35. package/dist/to_graphivz.js.map +1 -1
  36. package/dist/types.d.ts +1 -1
  37. package/dist/types.js +2 -2
  38. package/distNodeJS/build_documentation_to_file.d.ts +2 -2
  39. package/distNodeJS/build_documentation_to_file.js +26 -26
  40. package/distNodeJS/build_model.d.ts +7 -7
  41. package/distNodeJS/build_model.js +21 -21
  42. package/distNodeJS/index.d.ts +5 -5
  43. package/distNodeJS/index.js +19 -19
  44. package/distNodeJS/symbol_cvs.d.ts +3 -3
  45. package/distNodeJS/symbol_cvs.js +63 -63
  46. package/examples/make_model.ts +4 -3
  47. package/package.json +19 -19
  48. package/source/displayNodeElement.ts +165 -112
  49. package/source/dump_state_machine_to_graphviz.ts +164 -0
  50. package/source/generate_markdown_doc.ts +217 -82
  51. package/source/to_graphivz.ts +129 -48
package/dist/index.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- export * from "./types";
2
- export * from "./displayNodeElement";
3
- export * from "./promoteToMandatory";
4
- export * from "./setNamespaceMetaData";
5
- export * from "./build_model_inner";
6
- export * from "./addExtensionObjectDataType";
7
- export * from "./symbol";
8
- export * from "./to_cvs";
9
- export * from "./to_graphivz";
10
- export * from "./generate_markdown_doc";
11
- export * from "node-opcua-address-space";
12
- export * from "node-opcua-nodesets";
13
- export * from "node-opcua-variant";
14
- export * from "node-opcua-assert";
15
- export * from "node-opcua-data-model";
16
- export * from "node-opcua-nodeid";
17
- export * from "node-opcua-numeric-range";
18
- export * from "node-opcua-status-code";
19
- export * from "node-opcua-basic-types";
20
- export * from "node-opcua-constants";
21
- export * from "node-opcua-assert";
22
- export * from "node-opcua-service-translate-browse-path";
23
- export { MethodIds, DataTypeIds, ReferenceTypeIds, VariableIds, VariableTypeIds, ObjectTypeIds, ObjectIds } from "node-opcua-constants";
24
- export { DataTypeDefinition, EnumDefinition, EnumDefinitionOptions, StructureDefinition, StructureDefinitionOptions } from "node-opcua-types";
1
+ export * from "./types";
2
+ export * from "./displayNodeElement";
3
+ export * from "./promoteToMandatory";
4
+ export * from "./setNamespaceMetaData";
5
+ export * from "./build_model_inner";
6
+ export * from "./addExtensionObjectDataType";
7
+ export * from "./symbol";
8
+ export * from "./to_cvs";
9
+ export * from "./to_graphivz";
10
+ export * from "./generate_markdown_doc";
11
+ export * from "node-opcua-address-space";
12
+ export * from "node-opcua-nodesets";
13
+ export * from "node-opcua-variant";
14
+ export * from "node-opcua-assert";
15
+ export * from "node-opcua-data-model";
16
+ export * from "node-opcua-nodeid";
17
+ export * from "node-opcua-numeric-range";
18
+ export * from "node-opcua-status-code";
19
+ export * from "node-opcua-basic-types";
20
+ export * from "node-opcua-constants";
21
+ export * from "node-opcua-assert";
22
+ export * from "node-opcua-service-translate-browse-path";
23
+ export { MethodIds, DataTypeIds, ReferenceTypeIds, VariableIds, VariableTypeIds, ObjectTypeIds, ObjectIds } from "node-opcua-constants";
24
+ export { DataTypeDefinition, EnumDefinition, EnumDefinitionOptions, StructureDefinition, StructureDefinitionOptions } from "node-opcua-types";
package/dist/index.js CHANGED
@@ -1,49 +1,49 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.StructureDefinition = exports.EnumDefinition = exports.DataTypeDefinition = exports.ObjectIds = exports.ObjectTypeIds = exports.VariableTypeIds = exports.VariableIds = exports.ReferenceTypeIds = exports.DataTypeIds = exports.MethodIds = void 0;
14
- __exportStar(require("./types"), exports);
15
- __exportStar(require("./displayNodeElement"), exports);
16
- __exportStar(require("./promoteToMandatory"), exports);
17
- __exportStar(require("./setNamespaceMetaData"), exports);
18
- __exportStar(require("./build_model_inner"), exports);
19
- __exportStar(require("./addExtensionObjectDataType"), exports);
20
- __exportStar(require("./symbol"), exports);
21
- __exportStar(require("./to_cvs"), exports);
22
- __exportStar(require("./to_graphivz"), exports);
23
- __exportStar(require("./generate_markdown_doc"), exports);
24
- //
25
- __exportStar(require("node-opcua-address-space"), exports);
26
- __exportStar(require("node-opcua-nodesets"), exports);
27
- __exportStar(require("node-opcua-variant"), exports);
28
- __exportStar(require("node-opcua-assert"), exports);
29
- __exportStar(require("node-opcua-data-model"), exports);
30
- __exportStar(require("node-opcua-nodeid"), exports);
31
- __exportStar(require("node-opcua-numeric-range"), exports);
32
- __exportStar(require("node-opcua-status-code"), exports);
33
- __exportStar(require("node-opcua-basic-types"), exports);
34
- __exportStar(require("node-opcua-constants"), exports);
35
- __exportStar(require("node-opcua-assert"), exports);
36
- __exportStar(require("node-opcua-service-translate-browse-path"), exports);
37
- var node_opcua_constants_1 = require("node-opcua-constants");
38
- Object.defineProperty(exports, "MethodIds", { enumerable: true, get: function () { return node_opcua_constants_1.MethodIds; } });
39
- Object.defineProperty(exports, "DataTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.DataTypeIds; } });
40
- Object.defineProperty(exports, "ReferenceTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.ReferenceTypeIds; } });
41
- Object.defineProperty(exports, "VariableIds", { enumerable: true, get: function () { return node_opcua_constants_1.VariableIds; } });
42
- Object.defineProperty(exports, "VariableTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.VariableTypeIds; } });
43
- Object.defineProperty(exports, "ObjectTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.ObjectTypeIds; } });
44
- Object.defineProperty(exports, "ObjectIds", { enumerable: true, get: function () { return node_opcua_constants_1.ObjectIds; } });
45
- var node_opcua_types_1 = require("node-opcua-types");
46
- Object.defineProperty(exports, "DataTypeDefinition", { enumerable: true, get: function () { return node_opcua_types_1.DataTypeDefinition; } });
47
- Object.defineProperty(exports, "EnumDefinition", { enumerable: true, get: function () { return node_opcua_types_1.EnumDefinition; } });
48
- Object.defineProperty(exports, "StructureDefinition", { enumerable: true, get: function () { return node_opcua_types_1.StructureDefinition; } });
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.StructureDefinition = exports.EnumDefinition = exports.DataTypeDefinition = exports.ObjectIds = exports.ObjectTypeIds = exports.VariableTypeIds = exports.VariableIds = exports.ReferenceTypeIds = exports.DataTypeIds = exports.MethodIds = void 0;
14
+ __exportStar(require("./types"), exports);
15
+ __exportStar(require("./displayNodeElement"), exports);
16
+ __exportStar(require("./promoteToMandatory"), exports);
17
+ __exportStar(require("./setNamespaceMetaData"), exports);
18
+ __exportStar(require("./build_model_inner"), exports);
19
+ __exportStar(require("./addExtensionObjectDataType"), exports);
20
+ __exportStar(require("./symbol"), exports);
21
+ __exportStar(require("./to_cvs"), exports);
22
+ __exportStar(require("./to_graphivz"), exports);
23
+ __exportStar(require("./generate_markdown_doc"), exports);
24
+ //
25
+ __exportStar(require("node-opcua-address-space"), exports);
26
+ __exportStar(require("node-opcua-nodesets"), exports);
27
+ __exportStar(require("node-opcua-variant"), exports);
28
+ __exportStar(require("node-opcua-assert"), exports);
29
+ __exportStar(require("node-opcua-data-model"), exports);
30
+ __exportStar(require("node-opcua-nodeid"), exports);
31
+ __exportStar(require("node-opcua-numeric-range"), exports);
32
+ __exportStar(require("node-opcua-status-code"), exports);
33
+ __exportStar(require("node-opcua-basic-types"), exports);
34
+ __exportStar(require("node-opcua-constants"), exports);
35
+ __exportStar(require("node-opcua-assert"), exports);
36
+ __exportStar(require("node-opcua-service-translate-browse-path"), exports);
37
+ var node_opcua_constants_1 = require("node-opcua-constants");
38
+ Object.defineProperty(exports, "MethodIds", { enumerable: true, get: function () { return node_opcua_constants_1.MethodIds; } });
39
+ Object.defineProperty(exports, "DataTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.DataTypeIds; } });
40
+ Object.defineProperty(exports, "ReferenceTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.ReferenceTypeIds; } });
41
+ Object.defineProperty(exports, "VariableIds", { enumerable: true, get: function () { return node_opcua_constants_1.VariableIds; } });
42
+ Object.defineProperty(exports, "VariableTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.VariableTypeIds; } });
43
+ Object.defineProperty(exports, "ObjectTypeIds", { enumerable: true, get: function () { return node_opcua_constants_1.ObjectTypeIds; } });
44
+ Object.defineProperty(exports, "ObjectIds", { enumerable: true, get: function () { return node_opcua_constants_1.ObjectIds; } });
45
+ var node_opcua_types_1 = require("node-opcua-types");
46
+ Object.defineProperty(exports, "DataTypeDefinition", { enumerable: true, get: function () { return node_opcua_types_1.DataTypeDefinition; } });
47
+ Object.defineProperty(exports, "EnumDefinition", { enumerable: true, get: function () { return node_opcua_types_1.EnumDefinition; } });
48
+ Object.defineProperty(exports, "StructureDefinition", { enumerable: true, get: function () { return node_opcua_types_1.StructureDefinition; } });
49
49
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- import { UAMethod, UAObject, UAObjectType, UAReference, UAVariable, UAVariableType, ModellingRuleType } from "node-opcua-address-space";
2
- export declare type UAConcrete = UAVariable | UAObject | UAMethod;
3
- export declare function getChildInTypeOrBaseType(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number): {
4
- propInSuperType: UAConcrete;
5
- reference: UAReference;
6
- };
7
- export declare function promoteToMandatory(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number): UAConcrete;
8
- export declare function promoteChild(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number, modellingRule: ModellingRuleType): UAConcrete;
1
+ import { UAMethod, UAObject, UAObjectType, UAReference, UAVariable, UAVariableType, ModellingRuleType } from "node-opcua-address-space";
2
+ export declare type UAConcrete = UAVariable | UAObject | UAMethod;
3
+ export declare function getChildInTypeOrBaseType(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number): {
4
+ propInSuperType: UAConcrete;
5
+ reference: UAReference;
6
+ };
7
+ export declare function promoteToMandatory(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number): UAConcrete;
8
+ export declare function promoteChild(node: UAObjectType | UAVariableType, propertyName: string, namespaceIndex: number, modellingRule: ModellingRuleType): UAConcrete;
@@ -1,98 +1,98 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promoteChild = exports.promoteToMandatory = exports.getChildInTypeOrBaseType = void 0;
4
- const node_opcua_data_model_1 = require("node-opcua-data-model");
5
- const node_opcua_service_translate_browse_path_1 = require("node-opcua-service-translate-browse-path");
6
- const displayNodeElement_1 = require("./displayNodeElement");
7
- // find the reference that links node1 to node2
8
- function findReferenceToNode(node1, node2) {
9
- const references = node1.allReferences();
10
- const r = references.filter((reference) => {
11
- return reference.nodeId.toString() === node2.nodeId.toString();
12
- });
13
- const ref = r ? r[0] : null;
14
- /* istanbul ignore next */
15
- if (!ref) {
16
- // may be from subtype
17
- if (node1.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType ||
18
- node1.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType ||
19
- node1.nodeClass === node_opcua_data_model_1.NodeClass.VariableType) {
20
- const uaType = node1;
21
- if (uaType.subtypeOfObj) {
22
- return findReferenceToNode(uaType.subtypeOfObj, node2);
23
- }
24
- }
25
- throw new Error("Internal Error cannot find ref from node " + node1.nodeId.toString() + " " + node2.nodeId.toString());
26
- }
27
- return ref;
28
- }
29
- function getChildInTypeOrBaseType(node, propertyName, namespaceIndex) {
30
- const addressSpace = node.addressSpace;
31
- const subtypeOf = node.subtypeOfObj;
32
- /* istanbul ignore next */
33
- if (!subtypeOf) {
34
- throw new Error("Expecting a super type");
35
- }
36
- const browseResult = addressSpace.browsePath((0, node_opcua_service_translate_browse_path_1.makeBrowsePath)(subtypeOf.nodeId, `.${namespaceIndex}:${propertyName}`));
37
- const propNodeId = !browseResult.targets || !browseResult.targets[0] ? null : browseResult.targets[0].targetId;
38
- /* istanbul ignore next */
39
- if (!propNodeId) {
40
- (0, displayNodeElement_1.displayNodeElement)(subtypeOf);
41
- throw new Error("property " + propertyName + " do not exists on " + subtypeOf.browseName.toString() + " or any superType");
42
- }
43
- const propInSuperType = addressSpace.findNode(propNodeId);
44
- /* istanbul ignore next */
45
- if (!propInSuperType) {
46
- throw new Error("cannot find " + propNodeId.toString());
47
- }
48
- // replicate property
49
- const reference = findReferenceToNode(subtypeOf, propInSuperType);
50
- /* istanbul ignore next */
51
- if (!reference) {
52
- throw new Error("cannot find reference");
53
- }
54
- return { propInSuperType, reference };
55
- }
56
- exports.getChildInTypeOrBaseType = getChildInTypeOrBaseType;
57
- function promoteToMandatory(node, propertyName, namespaceIndex) {
58
- // get base node
59
- const { propInSuperType, reference } = getChildInTypeOrBaseType(node, propertyName, namespaceIndex);
60
- // check mandatory
61
- /* istanbul ignore next */
62
- if (propInSuperType.modellingRule === "Mandatory") {
63
- // tslint:disable-next-line: no-console
64
- console.log("Warning property " + propertyName + " is already Mandatory in super type");
65
- return propInSuperType;
66
- }
67
- const newRef = {
68
- isForward: false,
69
- nodeId: node.nodeId,
70
- referenceType: reference.referenceType
71
- };
72
- const newProp = propInSuperType.clone({
73
- namespace: node.namespace,
74
- modellingRule: "Mandatory",
75
- references: [newRef]
76
- });
77
- return newProp;
78
- }
79
- exports.promoteToMandatory = promoteToMandatory;
80
- function promoteChild(node, propertyName, namespaceIndex, modellingRule) {
81
- const { propInSuperType, reference } = getChildInTypeOrBaseType(node, propertyName, namespaceIndex);
82
- if (!modellingRule) {
83
- modellingRule = propInSuperType.modellingRule || null;
84
- }
85
- const newRef = {
86
- isForward: false,
87
- nodeId: node.nodeId,
88
- referenceType: reference.referenceType
89
- };
90
- const newProp = propInSuperType.clone({
91
- namespace: node.namespace,
92
- modellingRule,
93
- references: [Object.assign({}, newRef)]
94
- });
95
- return newProp;
96
- }
97
- exports.promoteChild = promoteChild;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.promoteChild = exports.promoteToMandatory = exports.getChildInTypeOrBaseType = void 0;
4
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
5
+ const node_opcua_service_translate_browse_path_1 = require("node-opcua-service-translate-browse-path");
6
+ const displayNodeElement_1 = require("./displayNodeElement");
7
+ // find the reference that links node1 to node2
8
+ function findReferenceToNode(node1, node2) {
9
+ const references = node1.allReferences();
10
+ const r = references.filter((reference) => {
11
+ return reference.nodeId.toString() === node2.nodeId.toString();
12
+ });
13
+ const ref = r ? r[0] : null;
14
+ /* istanbul ignore next */
15
+ if (!ref) {
16
+ // may be from subtype
17
+ if (node1.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType ||
18
+ node1.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType ||
19
+ node1.nodeClass === node_opcua_data_model_1.NodeClass.VariableType) {
20
+ const uaType = node1;
21
+ if (uaType.subtypeOfObj) {
22
+ return findReferenceToNode(uaType.subtypeOfObj, node2);
23
+ }
24
+ }
25
+ throw new Error("Internal Error cannot find ref from node " + node1.nodeId.toString() + " " + node2.nodeId.toString());
26
+ }
27
+ return ref;
28
+ }
29
+ function getChildInTypeOrBaseType(node, propertyName, namespaceIndex) {
30
+ const addressSpace = node.addressSpace;
31
+ const subtypeOf = node.subtypeOfObj;
32
+ /* istanbul ignore next */
33
+ if (!subtypeOf) {
34
+ throw new Error("Expecting a super type");
35
+ }
36
+ const browseResult = addressSpace.browsePath((0, node_opcua_service_translate_browse_path_1.makeBrowsePath)(subtypeOf.nodeId, `.${namespaceIndex}:${propertyName}`));
37
+ const propNodeId = !browseResult.targets || !browseResult.targets[0] ? null : browseResult.targets[0].targetId;
38
+ /* istanbul ignore next */
39
+ if (!propNodeId) {
40
+ (0, displayNodeElement_1.displayNodeElement)(subtypeOf);
41
+ throw new Error("property " + propertyName + " do not exists on " + subtypeOf.browseName.toString() + " or any superType");
42
+ }
43
+ const propInSuperType = addressSpace.findNode(propNodeId);
44
+ /* istanbul ignore next */
45
+ if (!propInSuperType) {
46
+ throw new Error("cannot find " + propNodeId.toString());
47
+ }
48
+ // replicate property
49
+ const reference = findReferenceToNode(subtypeOf, propInSuperType);
50
+ /* istanbul ignore next */
51
+ if (!reference) {
52
+ throw new Error("cannot find reference");
53
+ }
54
+ return { propInSuperType, reference };
55
+ }
56
+ exports.getChildInTypeOrBaseType = getChildInTypeOrBaseType;
57
+ function promoteToMandatory(node, propertyName, namespaceIndex) {
58
+ // get base node
59
+ const { propInSuperType, reference } = getChildInTypeOrBaseType(node, propertyName, namespaceIndex);
60
+ // check mandatory
61
+ /* istanbul ignore next */
62
+ if (propInSuperType.modellingRule === "Mandatory") {
63
+ // tslint:disable-next-line: no-console
64
+ console.log("Warning property " + propertyName + " is already Mandatory in super type");
65
+ return propInSuperType;
66
+ }
67
+ const newRef = {
68
+ isForward: false,
69
+ nodeId: node.nodeId,
70
+ referenceType: reference.referenceType
71
+ };
72
+ const newProp = propInSuperType.clone({
73
+ namespace: node.namespace,
74
+ modellingRule: "Mandatory",
75
+ references: [newRef]
76
+ });
77
+ return newProp;
78
+ }
79
+ exports.promoteToMandatory = promoteToMandatory;
80
+ function promoteChild(node, propertyName, namespaceIndex, modellingRule) {
81
+ const { propInSuperType, reference } = getChildInTypeOrBaseType(node, propertyName, namespaceIndex);
82
+ if (!modellingRule) {
83
+ modellingRule = propInSuperType.modellingRule || null;
84
+ }
85
+ const newRef = {
86
+ isForward: false,
87
+ nodeId: node.nodeId,
88
+ referenceType: reference.referenceType
89
+ };
90
+ const newProp = propInSuperType.clone({
91
+ namespace: node.namespace,
92
+ modellingRule,
93
+ references: [Object.assign({}, newRef)]
94
+ });
95
+ return newProp;
96
+ }
97
+ exports.promoteChild = promoteChild;
98
98
  //# sourceMappingURL=promoteToMandatory.js.map
@@ -1 +1 @@
1
- export { setNamespaceMetaData } from "node-opcua-address-space";
1
+ export { setNamespaceMetaData } from "node-opcua-address-space";
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setNamespaceMetaData = void 0;
4
- var node_opcua_address_space_1 = require("node-opcua-address-space");
5
- Object.defineProperty(exports, "setNamespaceMetaData", { enumerable: true, get: function () { return node_opcua_address_space_1.setNamespaceMetaData; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setNamespaceMetaData = void 0;
4
+ var node_opcua_address_space_1 = require("node-opcua-address-space");
5
+ Object.defineProperty(exports, "setNamespaceMetaData", { enumerable: true, get: function () { return node_opcua_address_space_1.setNamespaceMetaData; } });
6
6
  //# sourceMappingURL=setNamespaceMetaData.js.map
package/dist/symbol.d.ts CHANGED
@@ -1 +1 @@
1
- export declare type Symbols = [string, number, string][];
1
+ export declare type Symbols = [string, number, string][];
package/dist/symbol.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=symbol.js.map
@@ -1,9 +1,9 @@
1
- export declare class TableHelper {
2
- private readonly rows;
3
- private readonly table;
4
- private readonly head;
5
- constructor(head: string[]);
6
- push(row: unknown[]): void;
7
- toString(): string;
8
- toMarkdownTable(): string;
9
- }
1
+ export declare class TableHelper {
2
+ private readonly rows;
3
+ private readonly table;
4
+ private readonly head;
5
+ constructor(head: string[]);
6
+ push(row: unknown[]): void;
7
+ toString(): string;
8
+ toMarkdownTable(): string;
9
+ }
@@ -1,61 +1,61 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TableHelper = void 0;
4
- // tslint:disable-next-line: no-var-requires
5
- const Table = require("cli-table3");
6
- const chars1 = {
7
- // tslint:disable-next-line: object-literal-sort-keys
8
- "top": "-", "top-mid": "+", "top-left": "+", "top-right": "+",
9
- "bottom": "-", "bottom-mid": "+", "bottom-left": "+", "bottom-right": "+",
10
- "left": "|", "left-mid": "+", "mid": "-", "mid-mid": "+",
11
- "right": "|", "right-mid": "+", "middle": "|"
12
- };
13
- const chars2 = {
14
- // tslint:disable-next-line: object-literal-sort-keys
15
- "top": " ", "top-mid": " ", "top-left": " ", "top-right": " ",
16
- "bottom": " ", "bottom-mid": " ", "bottom-left": " ", "bottom-right": " ",
17
- "left": "| ", "left-mid": "| ", "mid": "-", "mid-mid": " | ",
18
- "right": " |", "right-mid": "| ", "middle": " | "
19
- };
20
- const chars3 = {
21
- // tslint:disable-next-line: object-literal-sort-keys
22
- "top": "", "top-mid": "", "top-left": "", "top-right": "",
23
- "bottom": "", "bottom-mid": "", "bottom-left": "", "bottom-right": "",
24
- "left": "| ", "left-mid": "", "mid": "-", "mid-mid": " | ",
25
- "right": " |", "right-mid": "", "middle": " | "
26
- };
27
- function toMarkdownTable(table) {
28
- const t = [];
29
- t.push("| " + table.head.join(" | ") + " |");
30
- t.push("| " + table.head.map(() => "---").join(" | ") + " |");
31
- for (const r of table.rows) {
32
- t.push("| " + r.join(" | ") + " |");
33
- }
34
- return t.join("\n");
35
- }
36
- class TableHelper {
37
- constructor(head) {
38
- this.rows = [];
39
- this.rows = [];
40
- // instantiate
41
- this.table = new Table({
42
- // chars,
43
- head,
44
- // colWidths: [100, 200, 50, 50,]
45
- });
46
- this.head = head;
47
- }
48
- push(row) {
49
- this.table.push(row);
50
- const row2 = row.map((c) => (c.content) ? c.content : c);
51
- this.rows.push(row2);
52
- }
53
- toString() {
54
- return this.table.toString();
55
- }
56
- toMarkdownTable() {
57
- return toMarkdownTable({ head: this.head, rows: this.rows });
58
- }
59
- }
60
- exports.TableHelper = TableHelper;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TableHelper = void 0;
4
+ // tslint:disable-next-line: no-var-requires
5
+ const Table = require("cli-table3");
6
+ const chars1 = {
7
+ // tslint:disable-next-line: object-literal-sort-keys
8
+ "top": "-", "top-mid": "+", "top-left": "+", "top-right": "+",
9
+ "bottom": "-", "bottom-mid": "+", "bottom-left": "+", "bottom-right": "+",
10
+ "left": "|", "left-mid": "+", "mid": "-", "mid-mid": "+",
11
+ "right": "|", "right-mid": "+", "middle": "|"
12
+ };
13
+ const chars2 = {
14
+ // tslint:disable-next-line: object-literal-sort-keys
15
+ "top": " ", "top-mid": " ", "top-left": " ", "top-right": " ",
16
+ "bottom": " ", "bottom-mid": " ", "bottom-left": " ", "bottom-right": " ",
17
+ "left": "| ", "left-mid": "| ", "mid": "-", "mid-mid": " | ",
18
+ "right": " |", "right-mid": "| ", "middle": " | "
19
+ };
20
+ const chars3 = {
21
+ // tslint:disable-next-line: object-literal-sort-keys
22
+ "top": "", "top-mid": "", "top-left": "", "top-right": "",
23
+ "bottom": "", "bottom-mid": "", "bottom-left": "", "bottom-right": "",
24
+ "left": "| ", "left-mid": "", "mid": "-", "mid-mid": " | ",
25
+ "right": " |", "right-mid": "", "middle": " | "
26
+ };
27
+ function toMarkdownTable(table) {
28
+ const t = [];
29
+ t.push("| " + table.head.join(" | ") + " |");
30
+ t.push("| " + table.head.map(() => "---").join(" | ") + " |");
31
+ for (const r of table.rows) {
32
+ t.push("| " + r.join(" | ") + " |");
33
+ }
34
+ return t.join("\n");
35
+ }
36
+ class TableHelper {
37
+ constructor(head) {
38
+ this.rows = [];
39
+ this.rows = [];
40
+ // instantiate
41
+ this.table = new Table({
42
+ // chars,
43
+ head,
44
+ // colWidths: [100, 200, 50, 50,]
45
+ });
46
+ this.head = head;
47
+ }
48
+ push(row) {
49
+ this.table.push(row);
50
+ const row2 = row.map((c) => (c.content) ? c.content : c);
51
+ this.rows.push(row2);
52
+ }
53
+ toString() {
54
+ return this.table.toString();
55
+ }
56
+ toMarkdownTable() {
57
+ return toMarkdownTable({ head: this.head, rows: this.rows });
58
+ }
59
+ }
60
+ exports.TableHelper = TableHelper;
61
61
  //# sourceMappingURL=tableHelper.js.map
package/dist/to_cvs.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Symbols } from "./symbol";
2
- export declare function toCSV(arr: Symbols): string;
1
+ import { Symbols } from "./symbol";
2
+ export declare function toCSV(arr: Symbols): string;
package/dist/to_cvs.js CHANGED
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCSV = void 0;
4
- function toCSV(arr) {
5
- const line = [];
6
- for (const [name, value, nodeClass] of arr) {
7
- line.push([name, value, nodeClass].join(","));
8
- }
9
- return line.join("\n");
10
- }
11
- exports.toCSV = toCSV;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toCSV = void 0;
4
+ function toCSV(arr) {
5
+ const line = [];
6
+ for (const [name, value, nodeClass] of arr) {
7
+ line.push([name, value, nodeClass].join(","));
8
+ }
9
+ return line.join("\n");
10
+ }
11
+ exports.toCSV = toCSV;
12
12
  //# sourceMappingURL=to_cvs.js.map
@@ -1,13 +1,14 @@
1
- import { UAReferenceType, UADataType, UAObjectType, UAVariableType } from "node-opcua-address-space";
2
- interface Options {
3
- naked: boolean;
4
- }
5
- export declare function opcuaToDot(node: UAObjectType | UAVariableType, options?: Options): string;
6
- export declare function dumpClassHierachry(typeNode: UAObjectType | UAVariableType | UADataType | UAReferenceType, options?: {
7
- naked?: boolean;
8
- depth?: number;
9
- showBaseType?: boolean;
10
- showSubType?: boolean;
11
- }): string;
12
- export declare function dumpTypeDiagram(namespace: any): string;
13
- export {};
1
+ import { UAReferenceType, UADataType, UAObjectType, UAVariableType } from "node-opcua-address-space";
2
+ interface Options {
3
+ naked: boolean;
4
+ }
5
+ export declare function opcuaToDot(node: UAObjectType | UAVariableType, options?: Options): string;
6
+ export declare function dumpClassHierachry(typeNode: UAObjectType | UAVariableType | UADataType | UAReferenceType, options?: {
7
+ naked?: boolean;
8
+ depth?: number;
9
+ showBaseType?: boolean;
10
+ showSubType?: boolean;
11
+ }): string;
12
+ export declare function graphVizToPlantUml(str: string): string;
13
+ export declare function dumpTypeDiagram(namespace: any): string;
14
+ export {};