node-opcua-convert-nodeset-to-javascript 2.76.0 → 2.77.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.
Files changed (44) hide show
  1. package/dist/_dataType.d.ts +10 -0
  2. package/dist/_dataType.js +153 -0
  3. package/dist/_dataType.js.map +1 -0
  4. package/dist/convert_namespace_to_typescript.d.ts +3 -3
  5. package/dist/convert_namespace_to_typescript.js +182 -182
  6. package/dist/convert_to_typescript.d.ts +105 -110
  7. package/dist/convert_to_typescript.js +753 -987
  8. package/dist/convert_to_typescript.js.map +1 -1
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +19 -19
  11. package/dist/main.d.ts +1 -1
  12. package/dist/main.js +77 -74
  13. package/dist/main.js.map +1 -1
  14. package/dist/official_namespaces.d.ts +23 -23
  15. package/dist/official_namespaces.js +35 -35
  16. package/dist/official_namespaces.js.map +1 -1
  17. package/dist/options.d.ts +5 -5
  18. package/dist/options.js +2 -2
  19. package/dist/private/cache.d.ts +61 -59
  20. package/dist/private/cache.js +236 -221
  21. package/dist/private/cache.js.map +1 -1
  22. package/dist/private/get_corresponding_data_type.d.ts +14 -0
  23. package/dist/private/get_corresponding_data_type.js +104 -0
  24. package/dist/private/get_corresponding_data_type.js.map +1 -0
  25. package/dist/private/to_filename.d.ts +1 -1
  26. package/dist/private/to_filename.js +9 -9
  27. package/dist/private/utils.d.ts +31 -31
  28. package/dist/private/utils.js +289 -289
  29. package/dist/private-stuff.d.ts +4 -4
  30. package/dist/private-stuff.js +20 -20
  31. package/dist/utils2.d.ts +7 -0
  32. package/dist/utils2.js +58 -0
  33. package/dist/utils2.js.map +1 -0
  34. package/dist/walk_through.d.ts +13 -13
  35. package/dist/walk_through.js +86 -86
  36. package/package.json +19 -18
  37. package/source/_dataType.ts +164 -0
  38. package/source/convert_to_typescript.ts +4 -252
  39. package/source/main.ts +5 -2
  40. package/source/official_namespaces.ts +0 -1
  41. package/source/private/cache.ts +24 -7
  42. package/source/private/get_corresponding_data_type.ts +104 -0
  43. package/source/utils2.ts +55 -0
  44. package/tsconfig-generated.json +4 -1
@@ -1,110 +1,105 @@
1
- import { LocalizedText, NodeClass, QualifiedName } from "node-opcua-data-model";
2
- import { NodeId } from "node-opcua-nodeid";
3
- import { IBasicSession } from "node-opcua-pseudo-session";
4
- import { ReferenceDescription } from "node-opcua-types";
5
- import { LineFile } from "node-opcua-utils";
6
- import { DataType } from "node-opcua-variant";
7
- import { ModellingRuleType } from "node-opcua-address-space-base";
8
- import { Cache, Import } from "./private/cache";
9
- import { Options } from "./options";
10
- export declare function convertDataTypeToTypescript(session: IBasicSession, dataTypeId: NodeId): Promise<void>;
11
- interface ClassDefinition {
12
- nodeClass: NodeClass.VariableType | NodeClass.ObjectType;
13
- browseName: QualifiedName;
14
- isAbstract: boolean;
15
- description: LocalizedText;
16
- superType?: ReferenceDescription;
17
- baseClassDef?: ClassDefinition | null;
18
- children: ReferenceDescription[];
19
- members: ClassMember[];
20
- interfaceName: Import;
21
- baseInterfaceName: Import | null;
22
- dataTypeNodeId: NodeId | null;
23
- dataType: DataType;
24
- dataTypeName: string;
25
- dataTypeImport?: Import[];
26
- }
27
- export declare function makeTypeName2(nodeClass: NodeClass, browseName: QualifiedName, suffix?: string): Import;
28
- export declare function extractClassDefinition(session: IBasicSession, nodeId: NodeId, cache: Cache): Promise<ClassDefinition>;
29
- interface ClassMemberBasic {
30
- name: string;
31
- childType: Import;
32
- isOptional: boolean;
33
- modellingRule: ModellingRuleType | null;
34
- description: LocalizedText;
35
- suffix?: string;
36
- suffixInstantiate?: string;
37
- chevrons: any;
38
- typeToReference: Import[];
39
- }
40
- interface ClassMember extends ClassMemberBasic {
41
- /**
42
- * the OPCUA name of the class member
43
- */
44
- browseName: QualifiedName;
45
- nodeClass: NodeClass.Object | NodeClass.Method | NodeClass.Variable;
46
- /**
47
- * the Typescript name of the class Member
48
- */
49
- name: string;
50
- modellingRule: ModellingRuleType | null;
51
- isOptional: boolean;
52
- /**
53
- * class Def
54
- */
55
- classDef: ClassDefinition | null;
56
- description: LocalizedText;
57
- typeDefinition: ReferenceDescription;
58
- childType: Import;
59
- children: ReferenceDescription[];
60
- children2: ClassMemberBasic[];
61
- dataTypeNodeId?: NodeId | null;
62
- dataType?: DataType;
63
- jtype?: string;
64
- suffix?: string;
65
- suffix2?: string;
66
- suffix3?: string;
67
- innerClass?: Import | null;
68
- childBase?: Import | null;
69
- }
70
- interface ClassifiedReferenceDescriptions {
71
- Mandatory: ReferenceDescription[];
72
- Optional: ReferenceDescription[];
73
- MandatoryPlaceholder: ReferenceDescription[];
74
- OptionalPlaceholder: ReferenceDescription[];
75
- ExposesItsArray: ReferenceDescription[];
76
- }
77
- export declare function findClassMember(session: IBasicSession, browseName: QualifiedName, baseParentDef: ClassDefinition, cache: Cache): Promise<ClassMember | null>;
78
- export declare function checkIfShouldExposeInnerDefinition(main: ClassifiedReferenceDescriptions, instance: ClassifiedReferenceDescriptions): boolean;
79
- interface ClassDefinitionB {
80
- superType?: {
81
- nodeId: NodeId;
82
- };
83
- interfaceName: Import;
84
- baseClassDef?: ClassDefinition | null;
85
- }
86
- export declare function extractClassMemberDef(session: IBasicSession, nodeId: NodeId, parentDef: ClassDefinitionB, cache: Cache): Promise<ClassMember>;
87
- export declare function findUsedImport(namespaceIndex: number, cache: Cache): string[];
88
- export declare type Type = "enum" | "basic" | "structure" | "ua";
89
- export declare function _exportDataTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
90
- type: Type;
91
- content: string;
92
- typeName: string;
93
- }>;
94
- /**
95
- * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
96
- */
97
- export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
98
- type: Type;
99
- content: string;
100
- typeName: string;
101
- }>;
102
- export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
103
- type: Type;
104
- content: string;
105
- module: string;
106
- folder: string;
107
- filename: string;
108
- dependencies: string[];
109
- }>;
110
- export {};
1
+ import { LocalizedText, NodeClass, QualifiedName } from "node-opcua-data-model";
2
+ import { NodeId } from "node-opcua-nodeid";
3
+ import { IBasicSession } from "node-opcua-pseudo-session";
4
+ import { ReferenceDescription } from "node-opcua-types";
5
+ import { LineFile } from "node-opcua-utils";
6
+ import { DataType } from "node-opcua-variant";
7
+ import { ModellingRuleType } from "node-opcua-address-space-base";
8
+ import { Cache, Import } from "./private/cache";
9
+ import { Options } from "./options";
10
+ export declare function convertDataTypeToTypescript(session: IBasicSession, dataTypeId: NodeId): Promise<void>;
11
+ interface ClassDefinition {
12
+ nodeClass: NodeClass.VariableType | NodeClass.ObjectType;
13
+ browseName: QualifiedName;
14
+ isAbstract: boolean;
15
+ description: LocalizedText;
16
+ superType?: ReferenceDescription;
17
+ baseClassDef?: ClassDefinition | null;
18
+ children: ReferenceDescription[];
19
+ members: ClassMember[];
20
+ interfaceName: Import;
21
+ baseInterfaceName: Import | null;
22
+ dataTypeNodeId: NodeId | null;
23
+ dataType: DataType;
24
+ dataTypeName: string;
25
+ dataTypeImport?: Import[];
26
+ }
27
+ export declare function makeTypeName2(nodeClass: NodeClass, browseName: QualifiedName, suffix?: string): Import;
28
+ export declare function extractClassDefinition(session: IBasicSession, nodeId: NodeId, cache: Cache): Promise<ClassDefinition>;
29
+ interface ClassMemberBasic {
30
+ name: string;
31
+ childType: Import;
32
+ isOptional: boolean;
33
+ modellingRule: ModellingRuleType | null;
34
+ description: LocalizedText;
35
+ suffix?: string;
36
+ suffixInstantiate?: string;
37
+ chevrons: any;
38
+ typeToReference: Import[];
39
+ }
40
+ interface ClassMember extends ClassMemberBasic {
41
+ /**
42
+ * the OPCUA name of the class member
43
+ */
44
+ browseName: QualifiedName;
45
+ nodeClass: NodeClass.Object | NodeClass.Method | NodeClass.Variable;
46
+ /**
47
+ * the Typescript name of the class Member
48
+ */
49
+ name: string;
50
+ modellingRule: ModellingRuleType | null;
51
+ isOptional: boolean;
52
+ /**
53
+ * class Def
54
+ */
55
+ classDef: ClassDefinition | null;
56
+ description: LocalizedText;
57
+ typeDefinition: ReferenceDescription;
58
+ childType: Import;
59
+ children: ReferenceDescription[];
60
+ children2: ClassMemberBasic[];
61
+ dataTypeNodeId?: NodeId | null;
62
+ dataType?: DataType;
63
+ jtype?: string;
64
+ suffix?: string;
65
+ suffix2?: string;
66
+ suffix3?: string;
67
+ innerClass?: Import | null;
68
+ childBase?: Import | null;
69
+ }
70
+ interface ClassifiedReferenceDescriptions {
71
+ Mandatory: ReferenceDescription[];
72
+ Optional: ReferenceDescription[];
73
+ MandatoryPlaceholder: ReferenceDescription[];
74
+ OptionalPlaceholder: ReferenceDescription[];
75
+ ExposesItsArray: ReferenceDescription[];
76
+ }
77
+ export declare function findClassMember(session: IBasicSession, browseName: QualifiedName, baseParentDef: ClassDefinition, cache: Cache): Promise<ClassMember | null>;
78
+ export declare function checkIfShouldExposeInnerDefinition(main: ClassifiedReferenceDescriptions, instance: ClassifiedReferenceDescriptions): boolean;
79
+ interface ClassDefinitionB {
80
+ superType?: {
81
+ nodeId: NodeId;
82
+ };
83
+ interfaceName: Import;
84
+ baseClassDef?: ClassDefinition | null;
85
+ }
86
+ export declare function extractClassMemberDef(session: IBasicSession, nodeId: NodeId, parentDef: ClassDefinitionB, cache: Cache): Promise<ClassMember>;
87
+ export declare function findUsedImport(namespaceIndex: number, cache: Cache): string[];
88
+ export declare type Type = "enum" | "basic" | "structure" | "ua";
89
+ /**
90
+ * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
91
+ */
92
+ export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
93
+ type: Type;
94
+ content: string;
95
+ typeName: string;
96
+ }>;
97
+ export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
98
+ type: Type;
99
+ content: string;
100
+ module: string;
101
+ folder: string;
102
+ filename: string;
103
+ dependencies: string[];
104
+ }>;
105
+ export {};