1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| {
| "name": "jhm",
| "version": "1.0.0",
| "description": "JHM-2028 TCP to MQTT gateway service",
| "license": "ISC",
| "author": "",
| "type": "commonjs",
| "main": "app.js",
| "scripts": {
| "start": "node app.js",
| "start:serial": "node jhm2028-service.js",
| "start:simulator": "node tcp-simulator.js",
| "start:simulator:bp": "node tcp-simulator.js --bp --host 127.0.0.1 --port 9000 --repeat 1",
| "clean": "node scripts/clean-build.js",
| "build": "node scripts/build-executables.js",
| "build:win": "node scripts/build-executables.js --target win-x64",
| "build:linux": "node scripts/build-executables.js --target linux-x64",
| "verify:commands": "node verify-all-commands.js",
| "verify:aliyun": "mocha \"test/**/*.test.js\"",
| "verify": "node -e \"const { JhmDecoder } = require('./decoder'); const decoder = new JhmDecoder({ alModelPath: './alModel.json' }); const results = decoder.push(Buffer.from([0xEE,0x55,0x01,0x00,0x00,0x01,0x72,0x74])); const result = results.find((item) => item.publish); if (!result || result.metric.F !== 37) { process.exit(1); } console.log('decoder verify passed');\"",
| "test": "npm run verify && npm run verify:aliyun"
| },
| "dependencies": {
| "aliyun-iot-device-sdk": "^1.0.1",
| "mammoth": "^1.12.0",
| "mqtt": "^5.15.1",
| "serialport": "^13.0.0"
| },
| "devDependencies": {
| "@vercel/ncc": "^0.38.4",
| "pkg": "^5.8.1",
| "mocha": "^11.7.5"
| },
| "pkg": {
| "assets": [
| "config.json",
| "alModel.json"
| ]
| }
| }
|
|