tlms_esd 0.1.0 → 0.6.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/.git-blame-ignore-revs +5 -0
- package/.gitattributes +9 -0
- package/.gitignore +41 -0
- package/.local/TODO.md +90 -0
- package/.local/data_structure2025.xlsx +0 -0
- package/.local/data_structure2026.xlsx +0 -0
- package/.local/issues/a6d39veq-actuator-emulator.md +75 -0
- package/.local/issues/v9xg9fxn-config-compile-entry.md +86 -0
- package/.local/issues/yqq38rn8-adapt-layout-data-emulator.md +74 -0
- package/.npmignore +18 -0
- package/AGENTS.md +153 -0
- package/CHANGELOG.md +192 -0
- package/cli.js +185 -263
- package/doc/design.md +691 -0
- package/doc/design.zh-cn.md +690 -0
- package/doc/spec-modbus.md +263 -0
- package/doc/spec-modbus.zh-cn.md +261 -0
- package/doc/spec.md +310 -0
- package/doc/spec.zh-cn.md +308 -0
- package/eslint.config.js +58 -0
- package/issues/yqq38rn8-adapt-layout-data-emulator.md +71 -0
- package/layouts.yaml +208 -0
- package/logs/error_2024-10-11.log +2 -0
- package/logs/error_2026-10-09.log +36 -0
- package/logs/error_2026-10-10.log +1 -0
- package/logs/error_2026-10-11.log +0 -0
- package/logs/error_2026-10-12.log +0 -0
- package/logs/error_2026-10-13.log +0 -0
- package/logs/error_2026-10-15.log +0 -0
- package/logs/error_2026-10-16.log +0 -0
- package/logs/error_2026-10-17.log +0 -0
- package/logs/error_2026-10-23.log +0 -0
- package/logs/error_2026-10-25.log +3 -0
- package/logs/error_2026-10-27.log +0 -0
- package/logs/error_2026-10-28.log +0 -0
- package/logs/error_2026-10-30.log +0 -0
- package/logs/error_2026-11-05.log +0 -0
- package/logs/error_2026-11-07.log +0 -0
- package/logs/error_2026-11-14.log +1 -0
- package/logs/error_2026-11-15.log +0 -0
- package/logs/error_2026-11-17.log +0 -0
- package/logs/error_2026-11-18.log +0 -0
- package/logs/error_2026-11-22.log +0 -0
- package/logs/info_2024-10-11.log +2 -0
- package/logs/info_2026-10-09.log +36 -0
- package/logs/info_2026-10-10.log +1 -0
- package/logs/info_2026-10-11.log +0 -0
- package/logs/info_2026-10-12.log +0 -0
- package/logs/info_2026-10-13.log +0 -0
- package/logs/info_2026-10-15.log +0 -0
- package/logs/info_2026-10-16.log +0 -0
- package/logs/info_2026-10-17.log +0 -0
- package/logs/info_2026-10-23.log +0 -0
- package/logs/info_2026-10-25.log +3 -0
- package/logs/info_2026-10-27.log +0 -0
- package/logs/info_2026-10-28.log +0 -0
- package/logs/info_2026-10-30.log +0 -0
- package/logs/info_2026-11-05.log +0 -0
- package/logs/info_2026-11-07.log +0 -0
- package/logs/info_2026-11-14.log +1 -0
- package/logs/info_2026-11-15.log +0 -0
- package/logs/info_2026-11-17.log +0 -0
- package/logs/info_2026-11-18.log +0 -0
- package/logs/info_2026-11-22.log +0 -0
- package/main.js +27852 -8191
- package/nodemon.json +9 -11
- package/package.json +24 -25
- package/rolldown.config.js +35 -0
- package/dev.js +0 -5
- package/emulator.js +0 -7768
- package/rollup.config.js +0 -41
package/nodemon.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"delay": "3",
|
|
12
|
-
"execMap": {}
|
|
2
|
+
"restartable": "rs",
|
|
3
|
+
"verbose": true,
|
|
4
|
+
"watch": [
|
|
5
|
+
"src/"
|
|
6
|
+
],
|
|
7
|
+
"ext": "js,yaml",
|
|
8
|
+
"ignore": [],
|
|
9
|
+
"delay": "3",
|
|
10
|
+
"execMap": {}
|
|
13
11
|
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tlms_esd",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Pipeline Leakage Emergency Shutdown System",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
6
|
"exports": {
|
|
8
7
|
"cli": "./cli.js",
|
|
9
|
-
"default": "./main.js"
|
|
10
|
-
"emu": "./emulator.js"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"modbus-serial": "^8.0.17"
|
|
8
|
+
"default": "./main.js"
|
|
14
9
|
},
|
|
15
10
|
"peerDependencies": {
|
|
16
|
-
"pm2": "^
|
|
11
|
+
"pm2": "^7.1.2"
|
|
17
12
|
},
|
|
18
13
|
"devDependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
14
|
+
"@eslint/js": "10.0.1",
|
|
15
|
+
"@st-one-io/nodes7": "^1.1.3",
|
|
16
|
+
"@stylistic/eslint-plugin": "6.0.1",
|
|
17
|
+
"csv-parser": "^3.2.1",
|
|
18
|
+
"es-modbus": "^0.3.2",
|
|
19
|
+
"eslint": "10.15.0",
|
|
20
|
+
"globals": "17.14.0",
|
|
21
|
+
"layout-data": "0.10.1",
|
|
22
|
+
"log4js": "^6.9.1",
|
|
23
|
+
"modbus-emulator": "^0.4.0",
|
|
25
24
|
"mri": "^1.2.0",
|
|
26
|
-
"nodemon": "^3.1.
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"rollup": "^4.18.0",
|
|
30
|
-
"yaml": "^2.4.5"
|
|
25
|
+
"nodemon": "^3.1.14",
|
|
26
|
+
"rolldown": "^1.3.3",
|
|
27
|
+
"yaml": "^2.9.1"
|
|
31
28
|
},
|
|
32
29
|
"directories": {
|
|
33
|
-
"conf": "example"
|
|
34
|
-
"lib": "lib"
|
|
30
|
+
"conf": "example"
|
|
35
31
|
},
|
|
36
32
|
"bin": {
|
|
37
33
|
"tlms": "./cli.js"
|
|
@@ -44,8 +40,11 @@
|
|
|
44
40
|
"author": "",
|
|
45
41
|
"license": "ISC",
|
|
46
42
|
"scripts": {
|
|
47
|
-
"build": "
|
|
48
|
-
"dev": "node
|
|
49
|
-
"watch": "nodemon
|
|
43
|
+
"build": "rolldown -c",
|
|
44
|
+
"dev": "cd example && node ../src/main.js TC",
|
|
45
|
+
"watch": "cd example && nodemon ../src/main.js TC --watch ../src --ext js",
|
|
46
|
+
"test": "node --test",
|
|
47
|
+
"lint": "eslint .",
|
|
48
|
+
"gen:types": "layout-types src/layouts.yaml --scope tlms -o src/layout_types.d.ts"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { defineConfig } from "rolldown";
|
|
3
|
+
import pkg from "./package.json" with { type: "json" };
|
|
4
|
+
|
|
5
|
+
// src/layouts.js reads layouts.yaml from its own directory, which is the
|
|
6
|
+
// directory of main.js once bundled: copy the layout file next to the bundle.
|
|
7
|
+
// It is emitted as a separate asset, not bundled into main.js.
|
|
8
|
+
const copy_layouts = {
|
|
9
|
+
name: "copy-layouts",
|
|
10
|
+
generateBundle() {
|
|
11
|
+
this.emitFile({
|
|
12
|
+
type: "asset",
|
|
13
|
+
fileName: "layouts.yaml",
|
|
14
|
+
source: readFileSync("src/layouts.yaml"),
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default defineConfig([{
|
|
20
|
+
input: "src/main.js",
|
|
21
|
+
platform: "node",
|
|
22
|
+
plugins: [copy_layouts],
|
|
23
|
+
output: {
|
|
24
|
+
file: pkg.exports.default,
|
|
25
|
+
format: "es",
|
|
26
|
+
},
|
|
27
|
+
}, {
|
|
28
|
+
input: "src/cli.js",
|
|
29
|
+
platform: "node",
|
|
30
|
+
output: {
|
|
31
|
+
file: pkg.exports.cli,
|
|
32
|
+
format: "es",
|
|
33
|
+
},
|
|
34
|
+
external: ["./main.js"],
|
|
35
|
+
}]);
|