node-opcua-modeler 2.97.0 → 2.98.2
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/addExtensionObjectDataType.d.ts +21 -21
- package/dist/addExtensionObjectDataType.js +132 -132
- package/dist/build_model_inner.d.ts +17 -17
- package/dist/build_model_inner.js +42 -42
- package/dist/displayNodeElement.d.ts +6 -6
- package/dist/displayNodeElement.js +220 -220
- package/dist/generate_markdown_doc.d.ts +41 -41
- package/dist/generate_markdown_doc.js +314 -314
- package/dist/index.d.ts +24 -24
- package/dist/index.js +52 -52
- package/dist/promoteToMandatory.d.ts +8 -8
- package/dist/promoteToMandatory.js +89 -89
- package/dist/setNamespaceMetaData.d.ts +1 -1
- package/dist/setNamespaceMetaData.js +5 -5
- package/dist/symbol.d.ts +1 -1
- package/dist/symbol.js +2 -2
- package/dist/tableHelper.d.ts +9 -9
- package/dist/tableHelper.js +60 -60
- package/dist/to_cvs.d.ts +2 -2
- package/dist/to_cvs.js +11 -11
- package/dist/types.d.ts +1 -1
- package/dist/types.js +2 -2
- package/distNodeJS/build_documentation_to_file.d.ts +3 -3
- package/distNodeJS/build_documentation_to_file.js +26 -26
- package/distNodeJS/build_model.d.ts +7 -7
- package/distNodeJS/build_model.js +21 -21
- package/distNodeJS/index.d.ts +5 -5
- package/distNodeJS/index.js +23 -23
- package/distNodeJS/symbol_cvs.d.ts +3 -3
- package/distNodeJS/symbol_cvs.js +63 -63
- package/package.json +28 -21
- package/MyModelIds.csv +0 -151
- package/examples/make_model.ts +0 -153
- package/source_nodejs/build_documentation_to_file.ts +0 -13
- package/source_nodejs/build_model.ts +0 -12
- package/source_nodejs/index.ts +0 -5
- package/source_nodejs/symbol_cvs.ts +0 -50
- package/tsconfig_common.json +0 -66
- package/tsconfig_nodejs.json +0 -25
package/source_nodejs/index.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as fs from "fs";
|
|
2
|
-
import { Parser, parse } from "csv-parse";
|
|
3
|
-
|
|
4
|
-
import { Symbols } from "..";
|
|
5
|
-
import { toCSV } from "..";
|
|
6
|
-
|
|
7
|
-
// node 14 onward : import { readFile, writeFile } from "fs/promises";
|
|
8
|
-
const { readFile, writeFile } = fs.promises;
|
|
9
|
-
|
|
10
|
-
export async function saveSymbolsToCSV(csvFilename: string, symbols: Symbols): Promise<void> {
|
|
11
|
-
await writeFile(csvFilename, toCSV(symbols), "utf-8");
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export async function getPresetSymbolsFromCSV(csvFilename: string): Promise<Symbols> {
|
|
15
|
-
if (!fs.existsSync(csvFilename)) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
const data = await readFile(csvFilename, "utf-8");
|
|
20
|
-
|
|
21
|
-
const records = await new Promise((resolve) => {
|
|
22
|
-
const output: any[] = [];
|
|
23
|
-
parse(data, {
|
|
24
|
-
cast: (value, context) => {
|
|
25
|
-
if (context.index === 1) {
|
|
26
|
-
return parseInt(value, 10);
|
|
27
|
-
}
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
.on("readable", function (this: Parser) {
|
|
32
|
-
let record = this.read();
|
|
33
|
-
while (record) {
|
|
34
|
-
output.push(record);
|
|
35
|
-
record = this.read();
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
.on("end", () => {
|
|
39
|
-
resolve(output);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
return records as Symbols;
|
|
43
|
-
} catch (err) {
|
|
44
|
-
if (err instanceof Error) {
|
|
45
|
-
// tslint:disable-next-line: no-console
|
|
46
|
-
console.log("getPresetSymbols err = ", err.message);
|
|
47
|
-
}
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
}
|
package/tsconfig_common.json
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "source",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"composite": true,
|
|
7
|
-
"incremental": true
|
|
8
|
-
},
|
|
9
|
-
"include": ["source/**/*.ts"],
|
|
10
|
-
"references": [
|
|
11
|
-
{
|
|
12
|
-
"path": "../node-opcua-client-dynamic-extension-object"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"path": "../node-opcua-address-space"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "../node-opcua-assert"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "../node-opcua-basic-types"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "../node-opcua-constants"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "../node-opcua-factory"
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
"path": "../node-opcua-schemas"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "../node-opcua-status-code"
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
"path": "../node-opcua-data-model"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"path": "../node-opcua-nodeid"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"path": "../node-opcua-nodesets"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"path": "../node-opcua-numeric-range"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"path": "../node-opcua-service-translate-browse-path"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"path": "../node-opcua-types"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"path": "../node-opcua-variant"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"path": "../node-opcua-debug"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"path": "../node-opcua-leak-detector"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"exclude": ["node_modules", "dist"]
|
|
66
|
-
}
|
package/tsconfig_nodejs.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "source_nodejs",
|
|
5
|
-
"outDir": "distNodeJS",
|
|
6
|
-
"composite": true,
|
|
7
|
-
"incremental": true
|
|
8
|
-
},
|
|
9
|
-
"ts-node": {
|
|
10
|
-
"compilerOptions": {
|
|
11
|
-
"inlineSourceMap": true
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"include": [
|
|
15
|
-
"source_nodejs/**/*.ts"
|
|
16
|
-
],
|
|
17
|
-
"references": [
|
|
18
|
-
{
|
|
19
|
-
"path": "./tsconfig_common.json"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"exclude": [
|
|
23
|
-
"node_modules" , "dist"
|
|
24
|
-
]
|
|
25
|
-
}
|