@live-change/server 0.7.3 → 0.7.5

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/Renderer.js CHANGED
@@ -42,7 +42,7 @@ class Renderer {
42
42
  }
43
43
 
44
44
  async renderPage(params) {
45
- const { url, dao, clientIp, credentials, windowId, version } = params
45
+ const { url, headers, dao, clientIp, credentials, windowId, version } = params
46
46
 
47
47
  const render = await this.getRenderFunction()
48
48
  const { html: appHtml, modules, data, meta, response } = await render(params)
package/lib/Services.js CHANGED
@@ -117,7 +117,7 @@ class Services {
117
117
  async update() {
118
118
  await Promise.all(this.serviceDefinitions.map(defn => {
119
119
  if(!defn.processed) {
120
- app.processServiceDefinition(defn, [ ...app.defaultProcessors ])
120
+ app.processServiceDefinition(defn)
121
121
  defn.processed = true
122
122
  }
123
123
  return app.updateService(defn)
@@ -128,7 +128,7 @@ class Services {
128
128
  await Promise.all(this.plugins.map(plugin => plugin(app, this)))
129
129
  this.services = await Promise.all(this.serviceDefinitions.map(defn => {
130
130
  if(!defn.processed) {
131
- app.processServiceDefinition(defn, [ ...app.defaultProcessors ])
131
+ app.processServiceDefinition(defn)
132
132
  defn.processed = true
133
133
  }
134
134
  return app.startService(defn, startOptions)
package/lib/SsrServer.js CHANGED
@@ -96,7 +96,6 @@ class SsrServer {
96
96
  })
97
97
  this.express.use('*', async (req, res) => {
98
98
  const url = req.originalUrl
99
- const host = req.get('host')
100
99
  const clientIp = getIp(req)
101
100
 
102
101
  const credentials = readCredentials(req)
@@ -110,7 +109,9 @@ class SsrServer {
110
109
 
111
110
  for(let retry = 0; retry < 3; retry ++) {
112
111
  try {
113
- result = await this.renderer.renderPage({ url, host, dao, clientIp, credentials, windowId, version })
112
+ result = await this.renderer.renderPage({
113
+ url, headers: req.headers, dao, clientIp, credentials, windowId, version
114
+ })
114
115
  break
115
116
  } catch(e) {
116
117
  error = e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/server",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Live Change Framework - server",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-framework",
23
23
  "dependencies": {
24
- "@live-change/dao": "0.5.7",
25
- "@live-change/dao-sockjs": "0.5.7",
24
+ "@live-change/dao": "0.5.8",
25
+ "@live-change/dao-sockjs": "0.5.8",
26
26
  "@live-change/db-server": "0.5.19",
27
- "@live-change/framework": "^0.7.3",
27
+ "@live-change/framework": "^0.7.5",
28
28
  "@live-change/sockjs": "0.4.1",
29
- "@live-change/uid": "^0.7.3",
29
+ "@live-change/uid": "^0.7.5",
30
30
  "dotenv": "^16.0.1",
31
31
  "express": "^4.18.1",
32
32
  "express-static-gzip": "2.1.7",
@@ -39,5 +39,5 @@
39
39
  "websocket": "^1.0.34",
40
40
  "yargs": "^17.5.1"
41
41
  },
42
- "gitHead": "678a56933a707927dc21360670f47333159cc2f6"
42
+ "gitHead": "f6b4d3d58f24d4106743a58b9f87e03293a4a0eb"
43
43
  }