@live-change/server 0.6.0 → 0.6.3

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.
Files changed (2) hide show
  1. package/lib/Renderer.js +4 -4
  2. package/package.json +8 -8
package/lib/Renderer.js CHANGED
@@ -20,7 +20,7 @@ class Renderer {
20
20
  this.module = require(serverEntryPath)
21
21
  this.renderer = this.module.render
22
22
  this.sitemap = this.module.sitemap
23
- const templatePath = path.resolve(this.root, 'dist/client/index.html')
23
+ const templatePath = path.resolve(this.root, './dist/client/index.html')
24
24
  this.template = await fs.promises.readFile(templatePath, { encoding: 'utf-8' })
25
25
  }
26
26
  }
@@ -104,7 +104,7 @@ class Renderer {
104
104
  async prepareTemplate(url) {
105
105
  let template = this.template
106
106
  if(this.settings.dev) {
107
- const templatePath = path.resolve(this.root, 'index.html')
107
+ const templatePath = path.resolve(this.root, this.settings.templatePath || 'index.html')
108
108
  template = await fs.promises.readFile(templatePath, { encoding: 'utf-8' })
109
109
  template = await this.vite.transformIndexHtml(url, template)
110
110
  }
@@ -114,7 +114,7 @@ class Renderer {
114
114
  async getRenderFunction() {
115
115
  if(this.settings.dev) {
116
116
  /// Reload every request
117
- const entryPath = path.resolve(this.root, 'src/entry-server.js')
117
+ const entryPath = path.resolve(this.root, this.settings.serverEntry || 'src/entry-server.js')
118
118
  return (await this.vite.ssrLoadModule(entryPath)).render
119
119
  } else {
120
120
  return this.renderer
@@ -124,7 +124,7 @@ class Renderer {
124
124
  async getSitemap() {
125
125
  if(this.settings.dev) {
126
126
  /// Reload every request
127
- const entryPath = path.resolve(this.root, 'src/entry-server.js')
127
+ const entryPath = path.resolve(this.root, this.settings.serverEntry || 'src/entry-server.js')
128
128
  return (await this.vite.ssrLoadModule(entryPath)).sitemap
129
129
  } else {
130
130
  return this.sitemap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/server",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
4
  "description": "Live Change Framework - server",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-framework",
23
23
  "dependencies": {
24
- "@live-change/dao": "0.4.3",
25
- "@live-change/dao-sockjs": "^0.2.1",
26
- "@live-change/db-server": "0.5.4",
27
- "@live-change/framework": "^0.6.0",
24
+ "@live-change/dao": "0.4.8",
25
+ "@live-change/dao-sockjs": "0.4.8",
26
+ "@live-change/db-server": "0.5.9",
27
+ "@live-change/framework": "^0.6.3",
28
28
  "@live-change/sockjs": "^0.4.0-rc.1",
29
- "@live-change/uid": "^0.6.0",
30
- "@live-change/vue3-ssr": "0.2.5",
29
+ "@live-change/uid": "0.6.0",
30
+ "@live-change/vue3-ssr": "0.2.7",
31
31
  "dotenv": "^10.0.0",
32
32
  "express": "^4.17.1",
33
33
  "express-static-gzip": "2.1.1",
@@ -39,5 +39,5 @@
39
39
  "websocket": "^1.0.34",
40
40
  "yargs": "^17.3.0"
41
41
  },
42
- "gitHead": "5e4250b3a6fcf11e46f36e6b9713c2a9f4a4dc92"
42
+ "gitHead": "d9fe68f41bd885b62894868679f7477529463fd4"
43
43
  }