node-opcua-convert-nodeset-to-javascript 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.
- package/dist/cache.d.ts +62 -0
- package/dist/cache.js +273 -0
- package/dist/cache.js.map +1 -0
- package/dist/convert_namespace_to_typescript.d.ts +3 -3
- package/dist/convert_namespace_to_typescript.js +172 -163
- package/dist/convert_namespace_to_typescript.js.map +1 -1
- package/dist/convert_to_typescript.d.ts +109 -109
- package/dist/convert_to_typescript.js +884 -879
- package/dist/convert_to_typescript.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -15
- package/dist/main.d.ts +1 -1
- package/dist/main.js +74 -65
- package/dist/main.js.map +1 -1
- package/dist/official_namespaces.d.ts +23 -23
- package/dist/official_namespaces.js +35 -35
- package/dist/options.d.ts +5 -4
- package/dist/options.js +2 -2
- package/dist/private/cache.d.ts +58 -58
- package/dist/private/cache.js +212 -212
- package/dist/private/cache.js.map +1 -1
- package/dist/private/to_filename.d.ts +1 -1
- package/dist/private/to_filename.js +9 -9
- package/dist/private/utils.d.ts +24 -24
- package/dist/private/utils.js +260 -260
- package/dist/private-stuff.d.ts +4 -4
- package/dist/private-stuff.js +16 -16
- package/dist/utils.d.ts +20 -0
- package/dist/utils.js +221 -0
- package/dist/utils.js.map +1 -0
- package/dist/walk_through.d.ts +13 -13
- package/dist/walk_through.js +86 -86
- package/package.json +22 -22
- package/source/convert_namespace_to_typescript.ts +21 -10
- package/source/convert_to_typescript.ts +23 -17
- package/source/main.ts +23 -14
- package/source/options.ts +1 -0
- package/source/private/cache.ts +1 -1
package/source/main.ts
CHANGED
|
@@ -18,10 +18,11 @@ async function main() {
|
|
|
18
18
|
nodesets.machinery,
|
|
19
19
|
nodesets.ia,
|
|
20
20
|
nodesets.machineTool,
|
|
21
|
-
nodesets.cnc
|
|
21
|
+
nodesets.cnc,
|
|
22
|
+
nodesets.woodWorking,
|
|
23
|
+
nodesets.glass
|
|
22
24
|
]);
|
|
23
25
|
|
|
24
|
-
|
|
25
26
|
const nsUA = 0;
|
|
26
27
|
const nsDI = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/DI/");
|
|
27
28
|
const nsADI = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/ADI/");
|
|
@@ -34,23 +35,31 @@ async function main() {
|
|
|
34
35
|
const nsMachineTool = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/MachineTool/");
|
|
35
36
|
const ncCNC = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/CNC");
|
|
36
37
|
const nsCommercialKitchenEquipment = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/CommercialKitchenEquipment/");
|
|
38
|
+
const nsWW = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/Woodworking/");
|
|
39
|
+
const nsGlass = addressSpace.getNamespaceIndex("http://opcfoundation.org/UA/Glass/Flat/");
|
|
37
40
|
|
|
38
41
|
const session = new PseudoSession(addressSpace);
|
|
39
42
|
const options = {
|
|
40
43
|
baseFolder: path.join(__dirname, "../../"),
|
|
41
44
|
prefix: "node-opcua-nodeset-"
|
|
42
45
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
|
|
47
|
+
const promises = [
|
|
48
|
+
convertNamespaceTypeToTypescript(session, nsUA, options),
|
|
49
|
+
convertNamespaceTypeToTypescript(session, nsDI, options),
|
|
50
|
+
convertNamespaceTypeToTypescript(session, nsADI, options),
|
|
51
|
+
convertNamespaceTypeToTypescript(session, nsMachineVision, options),
|
|
52
|
+
convertNamespaceTypeToTypescript(session, nsAutoId, options),
|
|
53
|
+
convertNamespaceTypeToTypescript(session, nsGds, options),
|
|
54
|
+
convertNamespaceTypeToTypescript(session, nsRobotics, options),
|
|
55
|
+
convertNamespaceTypeToTypescript(session, nsMachinery, options),
|
|
56
|
+
convertNamespaceTypeToTypescript(session, nsIA, options),
|
|
57
|
+
convertNamespaceTypeToTypescript(session, nsMachineTool, options),
|
|
58
|
+
convertNamespaceTypeToTypescript(session, ncCNC, options),
|
|
59
|
+
convertNamespaceTypeToTypescript(session, nsCommercialKitchenEquipment, options),
|
|
60
|
+
convertNamespaceTypeToTypescript(session, nsWW, options),
|
|
61
|
+
convertNamespaceTypeToTypescript(session, nsGlass, options)
|
|
62
|
+
];
|
|
63
|
+
await Promise.all(promises);
|
|
55
64
|
}
|
|
56
65
|
main();
|
package/source/options.ts
CHANGED
package/source/private/cache.ts
CHANGED
|
@@ -137,7 +137,7 @@ export class Cache implements CacheInterface {
|
|
|
137
137
|
function getSourceFolderForNamespace(browseName: QualifiedName, options: Options, cache: Cache2) {
|
|
138
138
|
const ns = browseName.namespaceIndex;
|
|
139
139
|
const n = cache.namespaceArray[ns].split("/").filter((s: string) => s.length !== 0);
|
|
140
|
-
const nn = n[n.length - 1];
|
|
140
|
+
const nn = (n[n.length - 1] !== "UA" && n[n.length - 2] !== "UA" ? n[n.length - 2] : "") + n[n.length - 1];
|
|
141
141
|
const module = options.prefix + kebabCase(nn);
|
|
142
142
|
const namespaceFolder = path.join(options.baseFolder, module);
|
|
143
143
|
const sourceFolder = path.join(namespaceFolder);
|