@live-change/cli 0.7.11 → 0.7.14

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/bin/lcli.js +12 -0
  2. package/package.json +4 -4
package/bin/lcli.js CHANGED
@@ -5,6 +5,7 @@ const path = require('path')
5
5
  const SegfaultHandler = require('segfault-handler')
6
6
  const http = require("http")
7
7
  const { createProxyMiddleware } = require('http-proxy-middleware')
8
+ const { readFile } = require('fs').promises
8
9
 
9
10
  const app = require("@live-change/framework").app()
10
11
 
@@ -118,6 +119,14 @@ function ssrServerOptions(yargs) {
118
119
  describe: 'front ssr entry file',
119
120
  type: 'string'
120
121
  })
122
+ yargs.option('version', {
123
+ describe: 'server version',
124
+ type: 'string'
125
+ })
126
+ yargs.option('versionFile', {
127
+ describe: 'server version file',
128
+ type: 'string'
129
+ })
121
130
  }
122
131
 
123
132
  const argv = require('yargs') // eslint-disable-line
@@ -241,6 +250,8 @@ async function ssrServer(argv, dev) {
241
250
 
242
251
  const manifest = dev ? null : require(path.resolve(ssrRoot, 'dist/client/ssr-manifest.json'))
243
252
 
253
+ if(argv.versionFile) argv.version = await readFile(argv.versionFile, 'utf8')
254
+
244
255
  if(!argv.withApi) {
245
256
  const apiServerHost = (argv.apiHost == '0.0.0.0' ? 'localhost' : argv.apiHost) + ':' + argv.apiPort
246
257
  const target = `http://${apiServerHost}/`
@@ -264,6 +275,7 @@ async function ssrServer(argv, dev) {
264
275
 
265
276
  console.log("ENDPOINTS INSTALLED! CREATING SSR SERVER!")
266
277
 
278
+
267
279
  const ssrServer = new SsrServer(expressApp, manifest, {
268
280
  ...argv,
269
281
  dev,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/cli",
3
- "version": "0.7.11",
3
+ "version": "0.7.14",
4
4
  "description": "Live Change Framework - command line interface",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,8 +28,8 @@
28
28
  "@live-change/dao-sockjs": "0.5.9",
29
29
  "@live-change/dao-websocket": "0.5.9",
30
30
  "@live-change/db-server": "0.5.23",
31
- "@live-change/framework": "^0.7.11",
32
- "@live-change/server": "^0.7.11",
31
+ "@live-change/framework": "^0.7.14",
32
+ "@live-change/server": "^0.7.14",
33
33
  "dotenv": "^16.0.1",
34
34
  "express": "^4.18.1",
35
35
  "http-proxy-middleware": "2.0.6",
@@ -40,5 +40,5 @@
40
40
  "websocket": "^1.0.34",
41
41
  "yargs": "^17.5.1"
42
42
  },
43
- "gitHead": "a1fae5446c033e23d798782404005b2f08de1191"
43
+ "gitHead": "3cbedb6521f6bcffbd962ec1029c5b6bf597afe0"
44
44
  }