@things-factory/shell 7.1.16 → 7.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "7.1.16",
3
+ "version": "7.1.22",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -42,7 +42,6 @@
42
42
  "@graphql-tools/schema": "^8.5.0",
43
43
  "@graphql-tools/utils": "^10.1.2",
44
44
  "@graphql-yoga/redis-event-target": "^3.0.1",
45
- "@hatiolab/koa-webpack": "^7.0.9",
46
45
  "@hatiolab/things-scene": "^3.2.0",
47
46
  "@koa/cors": "^5.0.0",
48
47
  "@material-design-icons/font": "^0.14.9",
@@ -65,7 +64,7 @@
65
64
  "@things-factory/env": "^7.1.16",
66
65
  "@things-factory/operato-license-checker": "^4.0.4",
67
66
  "@things-factory/styles": "^7.1.16",
68
- "@things-factory/utils": "^7.1.16",
67
+ "@things-factory/utils": "^7.1.17",
69
68
  "@webcomponents/scoped-custom-element-registry": "^0.0.9",
70
69
  "@webcomponents/webcomponentsjs": "^2.6.0",
71
70
  "args": "^5.0.0",
@@ -123,6 +122,7 @@
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": {
@@ -133,5 +133,5 @@
133
133
  "pg": "^8.7.3",
134
134
  "sqlite3": "^5.0.8"
135
135
  },
136
- "gitHead": "8f5a18bc2b3163170eeec1b495fa070158b5ee0a"
136
+ "gitHead": "b4b8efde4096ab1ec02bcf7623e32131254cbfd0"
137
137
  }
@@ -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(middleware)
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`)