@things-factory/shell 7.1.22 → 7.1.24
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/bin/things-factory-dockerize-arm +20 -0
- package/client/store.js +2 -1
- package/config/config.production.js +1 -0
- package/dist-server/server.js +18 -0
- package/dist-server/server.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/server/server.ts +21 -0
package/package.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/shell",
|
3
|
-
"version": "7.1.
|
3
|
+
"version": "7.1.24",
|
4
4
|
"description": "Core module for framework",
|
5
5
|
"bin": {
|
6
6
|
"things-factory": "bin/things-factory",
|
7
7
|
"things-factory-dev": "bin/things-factory-dev",
|
8
8
|
"things-factory-migration": "bin/things-factory-migration",
|
9
9
|
"things-factory-stop": "bin/things-factory-stop",
|
10
|
-
"things-factory-dockerize": "bin/things-factory-dockerize"
|
10
|
+
"things-factory-dockerize": "bin/things-factory-dockerize",
|
11
|
+
"things-factory-dockerize-arm": "bin/things-factory-dockerize-arm"
|
11
12
|
},
|
12
13
|
"main": "dist-server/index.js",
|
13
14
|
"browser": "client/index.js",
|
@@ -64,7 +65,7 @@
|
|
64
65
|
"@things-factory/env": "^7.1.16",
|
65
66
|
"@things-factory/operato-license-checker": "^4.0.4",
|
66
67
|
"@things-factory/styles": "^7.1.16",
|
67
|
-
"@things-factory/utils": "^7.1.
|
68
|
+
"@things-factory/utils": "^7.1.24",
|
68
69
|
"@webcomponents/scoped-custom-element-registry": "^0.0.9",
|
69
70
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
70
71
|
"args": "^5.0.0",
|
@@ -112,7 +113,6 @@
|
|
112
113
|
"pwa-helpers": "^0.9.1",
|
113
114
|
"react": "^18.2.0",
|
114
115
|
"react-dom": "^18.2.0",
|
115
|
-
"redux-thunk": "^2.3.0",
|
116
116
|
"regenerator-runtime": "^0.13.2",
|
117
117
|
"reselect": "^4.0.0",
|
118
118
|
"sass": "^1.50.1",
|
@@ -126,12 +126,12 @@
|
|
126
126
|
"ws": "^8.8.1"
|
127
127
|
},
|
128
128
|
"optionalDependencies": {
|
129
|
-
"better-sqlite3": "^
|
130
|
-
"mssql": "^
|
131
|
-
"mysql2": "^
|
132
|
-
"oracledb": "^
|
129
|
+
"better-sqlite3": "^11.5.0",
|
130
|
+
"mssql": "^11.0.1",
|
131
|
+
"mysql2": "^3.11.3",
|
132
|
+
"oracledb": "^6.6.0",
|
133
133
|
"pg": "^8.7.3",
|
134
134
|
"sqlite3": "^5.0.8"
|
135
135
|
},
|
136
|
-
"gitHead": "
|
136
|
+
"gitHead": "1838925b39cce3caa8e49a6dd2c15796af567695"
|
137
137
|
}
|
package/server/server.ts
CHANGED
@@ -264,6 +264,27 @@ const bootstrap = async () => {
|
|
264
264
|
})
|
265
265
|
)
|
266
266
|
|
267
|
+
// Set keep-alive timeout from configuration or fallback to default (65000ms).
|
268
|
+
// The keepAliveTimeout determines how long the server will keep an idle connection
|
269
|
+
// alive before closing it.
|
270
|
+
const keepAliveTimeout = config.get('keepAliveTimeout', 65000)
|
271
|
+
|
272
|
+
// Apply the configured keep-alive timeout to the server. If no configuration is
|
273
|
+
// provided, default to 65000ms (65 seconds). In the context of an external load balancer,
|
274
|
+
// this timeout is critical for maintaining persistent connections between the load
|
275
|
+
// balancer and the server. Setting a sufficiently long keepAliveTimeout minimizes
|
276
|
+
// the need to constantly re-establish TCP connections, improving efficiency and
|
277
|
+
// reducing connection overhead.
|
278
|
+
httpServer.keepAliveTimeout = keepAliveTimeout || 65000
|
279
|
+
|
280
|
+
// Set headersTimeout to be 1000ms (1 second) longer than keepAliveTimeout.
|
281
|
+
// This ensures the server has sufficient time to receive headers from the client
|
282
|
+
// before closing the connection, preventing premature disconnections. In the context
|
283
|
+
// of a load balancer, this ensures that if the load balancer is sending headers
|
284
|
+
// slowly (due to network delays or other factors), the connection isn't closed
|
285
|
+
// before the headers are fully transmitted.
|
286
|
+
httpServer.headersTimeout = keepAliveTimeout + 1000
|
287
|
+
|
267
288
|
httpServer.listen({ port: PORT }, () => {
|
268
289
|
logger.info(`🚀 Server ready at http://0.0.0.0:${PORT}/graphql`)
|
269
290
|
logger.info(`🚀 Subscriptions ready at ws://0.0.0.0:${PORT}/graphql`)
|