signalk-edge-link 2.0.0 → 2.1.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/lib/instance.js CHANGED
@@ -240,7 +240,7 @@ function createInstance(app, options, instanceId, pluginId, onStatusChange) {
240
240
  state.timer = false;
241
241
  return;
242
242
  }
243
- const actualBatchSize = Math.min(batchSize, state.deltas.length);
243
+ const actualBatchSize = Math.min(batchSize, state.deltas.length, state.maxDeltasPerBatch);
244
244
  const batch = state.deltas.slice(0, actualBatchSize);
245
245
  state.batchSendInFlight = true;
246
246
  try {
@@ -625,7 +625,7 @@ function createPipelineV2Server(app, state, metricsApi) {
625
625
  if (!Array.isArray(deltaMessage.updates) || deltaMessage.updates.length === 0) {
626
626
  continue;
627
627
  }
628
- trackPathStats(deltaMessage, decompressed.length / deltaCount);
628
+ trackPathStats(deltaMessage, decompressed.length / deltas.length);
629
629
  app.handleMessage("", deltaMessage);
630
630
  metrics.deltasReceived++;
631
631
  }
package/lib/pipeline.js CHANGED
@@ -203,7 +203,7 @@ function createPipeline(app, state, metricsApi) {
203
203
  continue;
204
204
  }
205
205
  // Track path stats for server-side analytics
206
- trackPathStats(deltaMessage, decompressed.length / deltaCount);
206
+ trackPathStats(deltaMessage, decompressed.length / deltas.length);
207
207
  app.handleMessage("", deltaMessage);
208
208
  // Log a compact summary only — never log full delta values which may
209
209
  // contain sensitive data (position, fuel, MMSI) in plaintext logs.
package/package.json CHANGED
@@ -1,161 +1,161 @@
1
- {
2
- "name": "signalk-edge-link",
3
- "version": "2.0.0",
4
- "description": "SignalK Edge Link. Secure UDP link for data exchange.",
5
- "main": "lib/index.js",
6
- "files": [
7
- "lib/",
8
- "public/",
9
- "schemas/"
10
- ],
11
- "keywords": [
12
- "signalk-node-server-plugin",
13
- "signalk-category-network",
14
- "signalk-webapp",
15
- "signalk-category-utility",
16
- "signalk-plugin-configurator"
17
- ],
18
- "signalk": {
19
- "appIcon": "./icons/icon-72x72.png",
20
- "displayName": "Edge Link Configuration"
21
- },
22
- "signalk-plugin-enabled-by-default": false,
23
- "scripts": {
24
- "clean:lib": "node -e \"const fs=require('fs');if(fs.existsSync('lib'))fs.rmSync('lib',{recursive:true,force:true});\"",
25
- "clean:public": "node -e \"const fs=require('fs');if(fs.existsSync('public'))fs.rmSync('public',{recursive:true,force:true});\"",
26
- "build": "npm run build:ts && npm run build:web",
27
- "build:web": "npm run clean:public && webpack --mode production",
28
- "build:ts": "npm run clean:lib && tsc",
29
- "check:ts": "tsc --noEmit",
30
- "dev": "webpack --mode development --watch",
31
- "test": "jest --runInBand",
32
- "test:v2": "jest __tests__/v2/",
33
- "test:integration": "jest test/integration/",
34
- "test:watch": "jest --watch",
35
- "test:coverage": "jest --coverage",
36
- "lint": "eslint .",
37
- "lint:fix": "eslint . --fix",
38
- "format": "prettier --write \"**/*.{js,ts,json,md}\"",
39
- "migrate:config": "node lib/scripts/migrate-config.js",
40
- "cli": "node lib/bin/edge-link-cli.js",
41
- "prepare": "husky"
42
- },
43
- "dependencies": {
44
- "@msgpack/msgpack": "^3.0.0",
45
- "@rjsf/core": "^5.18.4",
46
- "@rjsf/utils": "^5.18.4",
47
- "@rjsf/validator-ajv8": "^5.18.4",
48
- "ping-monitor": "^0.8.2"
49
- },
50
- "devDependencies": {
51
- "@babel/core": "^7.22.0",
52
- "@babel/preset-env": "^7.22.0",
53
- "@babel/preset-react": "^7.22.0",
54
- "@testing-library/jest-dom": "^5.17.0",
55
- "@testing-library/react": "^12.1.5",
56
- "@types/node": "^25.3.5",
57
- "@types/react": "^16.14.0",
58
- "@types/react-dom": "^16.9.0",
59
- "babel-loader": "^9.1.2",
60
- "copy-webpack-plugin": "^14.0.0",
61
- "css-loader": "^6.8.1",
62
- "eslint": "^8.57.1",
63
- "eslint-plugin-react": "^7.37.5",
64
- "html-webpack-plugin": "^5.5.3",
65
- "husky": "^9.1.7",
66
- "jest": "^29.7.0",
67
- "jest-environment-jsdom": "^30.3.0",
68
- "lint-staged": "^15.4.3",
69
- "mini-css-extract-plugin": "^2.7.6",
70
- "prettier": "^3.6.2",
71
- "react": "^16.13.1",
72
- "react-dom": "^16.13.1",
73
- "react-test-renderer": "^16.14.0",
74
- "style-loader": "^3.3.3",
75
- "ts-jest": "^29.4.6",
76
- "ts-loader": "^9.5.4",
77
- "typescript": "^5.9.3",
78
- "webpack": "^5.102.1",
79
- "webpack-cli": "^5.1.4"
80
- },
81
- "engines": {
82
- "node": ">=16"
83
- },
84
- "author": "Karl-Erik Gustafsson",
85
- "repository": "https://github.com/KEGustafsson/signalk-edge-link",
86
- "license": "MIT",
87
- "jest": {
88
- "testEnvironment": "node",
89
- "coverageDirectory": "coverage",
90
- "collectCoverageFrom": [
91
- "lib/**/*.js",
92
- "!lib/webapp/**",
93
- "!lib/components/**",
94
- "!lib/utils/**"
95
- ],
96
- "testMatch": [
97
- "**/__tests__/**/*.js",
98
- "**/*.test.js",
99
- "**/*.spec.js"
100
- ],
101
- "transform": {
102
- "^.+\\.js$": [
103
- "babel-jest",
104
- {
105
- "presets": [
106
- [
107
- "@babel/preset-env",
108
- {
109
- "targets": {
110
- "node": "current"
111
- }
112
- }
113
- ]
114
- ]
115
- }
116
- ],
117
- ".+\\.tsx$": [
118
- "ts-jest",
119
- {
120
- "tsconfig": "tsconfig.webapp.json",
121
- "diagnostics": false
122
- }
123
- ],
124
- "^.+\\.ts$": "ts-jest"
125
- },
126
- "moduleFileExtensions": [
127
- "ts",
128
- "tsx",
129
- "js",
130
- "json",
131
- "node"
132
- ],
133
- "testPathIgnorePatterns": [
134
- "/node_modules/",
135
- "/public/"
136
- ],
137
- "coverageThreshold": {
138
- "global": {
139
- "branches": 60,
140
- "functions": 65,
141
- "lines": 65,
142
- "statements": 65
143
- }
144
- }
145
- },
146
- "bin": {
147
- "edge-link-cli": "lib/bin/edge-link-cli.js"
148
- },
149
- "lint-staged": {
150
- "*.js": [
151
- "prettier --write",
152
- "eslint --fix"
153
- ],
154
- "*.ts": [
155
- "prettier --write"
156
- ],
157
- "*.{json,md}": [
158
- "prettier --write"
159
- ]
160
- }
161
- }
1
+ {
2
+ "name": "signalk-edge-link",
3
+ "version": "2.1.0",
4
+ "description": "SignalK Edge Link. Secure UDP link for data exchange.",
5
+ "main": "lib/index.js",
6
+ "files": [
7
+ "lib/",
8
+ "public/",
9
+ "schemas/"
10
+ ],
11
+ "keywords": [
12
+ "signalk-node-server-plugin",
13
+ "signalk-category-network",
14
+ "signalk-webapp",
15
+ "signalk-category-utility",
16
+ "signalk-plugin-configurator"
17
+ ],
18
+ "signalk": {
19
+ "appIcon": "./icons/icon-72x72.png",
20
+ "displayName": "Edge Link Configuration"
21
+ },
22
+ "signalk-plugin-enabled-by-default": false,
23
+ "scripts": {
24
+ "clean:lib": "node -e \"const fs=require('fs');if(fs.existsSync('lib'))fs.rmSync('lib',{recursive:true,force:true});\"",
25
+ "clean:public": "node -e \"const fs=require('fs');if(fs.existsSync('public'))fs.rmSync('public',{recursive:true,force:true});\"",
26
+ "build": "npm run build:ts && npm run build:web",
27
+ "build:web": "npm run clean:public && webpack --mode production",
28
+ "build:ts": "npm run clean:lib && tsc",
29
+ "check:ts": "tsc --noEmit",
30
+ "dev": "webpack --mode development --watch",
31
+ "test": "jest --runInBand",
32
+ "test:v2": "jest __tests__/v2/",
33
+ "test:integration": "jest test/integration/",
34
+ "test:watch": "jest --watch",
35
+ "test:coverage": "jest --coverage",
36
+ "lint": "eslint .",
37
+ "lint:fix": "eslint . --fix",
38
+ "format": "prettier --write \"**/*.{js,ts,json,md}\"",
39
+ "migrate:config": "node lib/scripts/migrate-config.js",
40
+ "cli": "node lib/bin/edge-link-cli.js",
41
+ "prepare": "husky"
42
+ },
43
+ "dependencies": {
44
+ "@msgpack/msgpack": "^3.0.0",
45
+ "@rjsf/core": "^5.18.4",
46
+ "@rjsf/utils": "^5.18.4",
47
+ "@rjsf/validator-ajv8": "^5.18.4",
48
+ "ping-monitor": "^0.8.2"
49
+ },
50
+ "devDependencies": {
51
+ "@babel/core": "^7.22.0",
52
+ "@babel/preset-env": "^7.22.0",
53
+ "@babel/preset-react": "^7.22.0",
54
+ "@testing-library/jest-dom": "^5.17.0",
55
+ "@testing-library/react": "^12.1.5",
56
+ "@types/node": "^25.3.5",
57
+ "@types/react": "^16.14.0",
58
+ "@types/react-dom": "^16.9.0",
59
+ "babel-loader": "^9.1.2",
60
+ "copy-webpack-plugin": "^14.0.0",
61
+ "css-loader": "^6.8.1",
62
+ "eslint": "^8.57.1",
63
+ "eslint-plugin-react": "^7.37.5",
64
+ "html-webpack-plugin": "^5.5.3",
65
+ "husky": "^9.1.7",
66
+ "jest": "^29.7.0",
67
+ "jest-environment-jsdom": "^30.3.0",
68
+ "lint-staged": "^15.4.3",
69
+ "mini-css-extract-plugin": "^2.7.6",
70
+ "prettier": "^3.6.2",
71
+ "react": "^16.13.1",
72
+ "react-dom": "^16.13.1",
73
+ "react-test-renderer": "^16.14.0",
74
+ "style-loader": "^3.3.3",
75
+ "ts-jest": "^29.4.6",
76
+ "ts-loader": "^9.5.4",
77
+ "typescript": "^5.9.3",
78
+ "webpack": "^5.102.1",
79
+ "webpack-cli": "^5.1.4"
80
+ },
81
+ "engines": {
82
+ "node": ">=16"
83
+ },
84
+ "author": "Karl-Erik Gustafsson",
85
+ "repository": "https://github.com/KEGustafsson/signalk-edge-link",
86
+ "license": "MIT",
87
+ "jest": {
88
+ "testEnvironment": "node",
89
+ "coverageDirectory": "coverage",
90
+ "collectCoverageFrom": [
91
+ "lib/**/*.js",
92
+ "!lib/webapp/**",
93
+ "!lib/components/**",
94
+ "!lib/utils/**"
95
+ ],
96
+ "testMatch": [
97
+ "**/__tests__/**/*.js",
98
+ "**/*.test.js",
99
+ "**/*.spec.js"
100
+ ],
101
+ "transform": {
102
+ "^.+\\.js$": [
103
+ "babel-jest",
104
+ {
105
+ "presets": [
106
+ [
107
+ "@babel/preset-env",
108
+ {
109
+ "targets": {
110
+ "node": "current"
111
+ }
112
+ }
113
+ ]
114
+ ]
115
+ }
116
+ ],
117
+ ".+\\.tsx$": [
118
+ "ts-jest",
119
+ {
120
+ "tsconfig": "tsconfig.webapp.json",
121
+ "diagnostics": false
122
+ }
123
+ ],
124
+ "^.+\\.ts$": "ts-jest"
125
+ },
126
+ "moduleFileExtensions": [
127
+ "ts",
128
+ "tsx",
129
+ "js",
130
+ "json",
131
+ "node"
132
+ ],
133
+ "testPathIgnorePatterns": [
134
+ "/node_modules/",
135
+ "/public/"
136
+ ],
137
+ "coverageThreshold": {
138
+ "global": {
139
+ "branches": 60,
140
+ "functions": 65,
141
+ "lines": 65,
142
+ "statements": 65
143
+ }
144
+ }
145
+ },
146
+ "bin": {
147
+ "edge-link-cli": "lib/bin/edge-link-cli.js"
148
+ },
149
+ "lint-staged": {
150
+ "*.js": [
151
+ "prettier --write",
152
+ "eslint --fix"
153
+ ],
154
+ "*.ts": [
155
+ "prettier --write"
156
+ ],
157
+ "*.{json,md}": [
158
+ "prettier --write"
159
+ ]
160
+ }
161
+ }