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.
- package/dist/_dataType.d.ts +10 -0
- package/dist/_dataType.js +153 -0
- package/dist/_dataType.js.map +1 -0
- package/dist/convert_namespace_to_typescript.d.ts +3 -3
- package/dist/convert_namespace_to_typescript.js +182 -182
- package/dist/convert_to_typescript.d.ts +105 -110
- package/dist/convert_to_typescript.js +753 -987
- package/dist/convert_to_typescript.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -19
- package/dist/main.d.ts +1 -1
- package/dist/main.js +77 -74
- package/dist/main.js.map +1 -1
- package/dist/official_namespaces.d.ts +23 -23
- package/dist/official_namespaces.js +35 -35
- package/dist/official_namespaces.js.map +1 -1
- package/dist/options.d.ts +5 -5
- package/dist/options.js +2 -2
- package/dist/private/cache.d.ts +61 -59
- package/dist/private/cache.js +236 -221
- package/dist/private/cache.js.map +1 -1
- package/dist/private/get_corresponding_data_type.d.ts +14 -0
- package/dist/private/get_corresponding_data_type.js +104 -0
- package/dist/private/get_corresponding_data_type.js.map +1 -0
- package/dist/private/to_filename.d.ts +1 -1
- package/dist/private/to_filename.js +9 -9
- package/dist/private/utils.d.ts +31 -31
- package/dist/private/utils.js +289 -289
- package/dist/private-stuff.d.ts +4 -4
- package/dist/private-stuff.js +20 -20
- package/dist/utils2.d.ts +7 -0
- package/dist/utils2.js +58 -0
- package/dist/utils2.js.map +1 -0
- package/dist/walk_through.d.ts +13 -13
- package/dist/walk_through.js +86 -86
- package/package.json +19 -18
- package/source/_dataType.ts +164 -0
- package/source/convert_to_typescript.ts +4 -252
- package/source/main.ts +5 -2
- package/source/official_namespaces.ts +0 -1
- package/source/private/cache.ts +24 -7
- package/source/private/get_corresponding_data_type.ts +104 -0
- package/source/utils2.ts +55 -0
- 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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export declare function
|
|
98
|
-
type: Type;
|
|
99
|
-
content: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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 {};
|