@things-factory/shell 8.0.0-alpha.8 → 8.0.0-beta.1
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/client/themes/calendar-theme.css +3 -1
- package/client/themes/index.css +2 -1
- package/config/config.production.js +1 -0
- package/dist-server/server-dev.js +4 -10
- package/dist-server/server-dev.js.map +1 -1
- 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 +21 -21
- package/server/server-dev.ts +6 -11
- package/server/server.ts +21 -0
package/package.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/shell",
|
3
|
-
"version": "8.0.0-
|
3
|
+
"version": "8.0.0-beta.1",
|
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",
|
@@ -42,8 +43,7 @@
|
|
42
43
|
"@graphql-tools/schema": "^8.5.0",
|
43
44
|
"@graphql-tools/utils": "^10.1.2",
|
44
45
|
"@graphql-yoga/redis-event-target": "^3.0.1",
|
45
|
-
"@hatiolab/
|
46
|
-
"@hatiolab/things-scene": "^8.0.0-alpha",
|
46
|
+
"@hatiolab/things-scene": "^8.0.0-beta",
|
47
47
|
"@koa/cors": "^5.0.0",
|
48
48
|
"@material-design-icons/font": "^0.14.9",
|
49
49
|
"@material/mwc-button": "^0.27.0",
|
@@ -53,19 +53,19 @@
|
|
53
53
|
"@material/mwc-textfield": "^0.27.0",
|
54
54
|
"@material/web": "^2.0.0",
|
55
55
|
"@open-wc/scoped-elements": "^2.1.3",
|
56
|
-
"@operato/board": "^8.0.0-
|
57
|
-
"@operato/graphql": "^8.0.0-
|
58
|
-
"@operato/help": "^8.0.0-
|
59
|
-
"@operato/layout": "^8.0.0-
|
60
|
-
"@operato/shell": "^8.0.0-
|
61
|
-
"@operato/typeorm-history": "^8.0.0-
|
62
|
-
"@operato/utils": "^8.0.0-
|
56
|
+
"@operato/board": "^8.0.0-beta",
|
57
|
+
"@operato/graphql": "^8.0.0-beta",
|
58
|
+
"@operato/help": "^8.0.0-beta",
|
59
|
+
"@operato/layout": "^8.0.0-beta",
|
60
|
+
"@operato/shell": "^8.0.0-beta",
|
61
|
+
"@operato/typeorm-history": "^8.0.0-beta",
|
62
|
+
"@operato/utils": "^8.0.0-beta",
|
63
63
|
"@reduxjs/toolkit": "^2.2.5",
|
64
|
-
"@things-factory/ejs-remote": "^8.0.0-
|
65
|
-
"@things-factory/env": "^8.0.0-
|
64
|
+
"@things-factory/ejs-remote": "^8.0.0-beta.1",
|
65
|
+
"@things-factory/env": "^8.0.0-beta.1",
|
66
66
|
"@things-factory/operato-license-checker": "^4.0.4",
|
67
|
-
"@things-factory/styles": "^8.0.0-
|
68
|
-
"@things-factory/utils": "^8.0.0-
|
67
|
+
"@things-factory/styles": "^8.0.0-beta.1",
|
68
|
+
"@things-factory/utils": "^8.0.0-beta.1",
|
69
69
|
"@webcomponents/scoped-custom-element-registry": "^0.0.9",
|
70
70
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
71
71
|
"args": "^5.0.0",
|
@@ -113,7 +113,6 @@
|
|
113
113
|
"pwa-helpers": "^0.9.1",
|
114
114
|
"react": "^18.2.0",
|
115
115
|
"react-dom": "^18.2.0",
|
116
|
-
"redux-thunk": "^2.3.0",
|
117
116
|
"regenerator-runtime": "^0.13.2",
|
118
117
|
"reselect": "^4.0.0",
|
119
118
|
"sass": "^1.50.1",
|
@@ -123,15 +122,16 @@
|
|
123
122
|
"uuid": "^10.0.0",
|
124
123
|
"web-animations-js": "^2.3.2",
|
125
124
|
"web-push": "^3.5.0",
|
125
|
+
"webpack-dev-middleware": "^7.4.2",
|
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": "36c494e587640c1490318ef7b95adab02606e0c2"
|
137
137
|
}
|
package/server/server-dev.ts
CHANGED
@@ -26,7 +26,6 @@ import { WebSocketServer } from 'ws'
|
|
26
26
|
import co from 'co'
|
27
27
|
import http from 'http'
|
28
28
|
|
29
|
-
import koaWebpack from '@hatiolab/koa-webpack'
|
30
29
|
import cors from '@koa/cors'
|
31
30
|
|
32
31
|
import crypto from 'crypto'
|
@@ -47,6 +46,7 @@ import { schema } from './schema'
|
|
47
46
|
import { Domain } from './service'
|
48
47
|
import { EntityManager } from 'typeorm'
|
49
48
|
import { domainMiddleware } from './middlewares'
|
49
|
+
const wdm = require('webpack-dev-middleware')
|
50
50
|
|
51
51
|
process.on('uncaughtException', error => {
|
52
52
|
logger.error('uncaughtException: ', error)
|
@@ -244,15 +244,6 @@ const bootstrap = async () => {
|
|
244
244
|
debug: false
|
245
245
|
})
|
246
246
|
|
247
|
-
const middleware = await koaWebpack({
|
248
|
-
compiler,
|
249
|
-
hotClient: {},
|
250
|
-
devMiddleware: {
|
251
|
-
publicPath: webpackConfig.output.publicPath,
|
252
|
-
stats: { colors: true }
|
253
|
-
}
|
254
|
-
})
|
255
|
-
|
256
247
|
// only for development mode. triggered after webpack compilation is done.
|
257
248
|
compiler.hooks.done.tap({ name: 'server-dev' }, stats => {
|
258
249
|
process.emit('client-rebuilt' as any, app, compiler.outputFileSystem)
|
@@ -297,7 +288,11 @@ const bootstrap = async () => {
|
|
297
288
|
/* should follow this order : history-fallback => webpack-middleware */
|
298
289
|
app.use(historyApiFallback({ whiteList: [] }))
|
299
290
|
|
300
|
-
app.use(
|
291
|
+
app.use(
|
292
|
+
wdm.koaWrapper(compiler, {
|
293
|
+
publicPath: webpackConfig.output.publicPath
|
294
|
+
})
|
295
|
+
)
|
301
296
|
|
302
297
|
httpServer.listen({ port: PORT }, () => {
|
303
298
|
logger.info(`🚀 Server ready at http://0.0.0.0:${PORT}/graphql`)
|
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`)
|