@live-change/cli 0.9.44 → 0.9.45

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/starter.js +15 -3
  2. package/package.json +8 -8
package/lib/starter.js CHANGED
@@ -196,6 +196,18 @@ export default function starter(servicesConfig = null, args = {}) {
196
196
  await setupApp({...argv, uidBorders: '[]'})
197
197
  await apiServer(argv)
198
198
  })
199
+ .command('localApiServer', 'shortcut for devApiServer --withServices --updateServices --withDb --createDb', (yargs) => {
200
+ apiServerOptions(yargs)
201
+ startOptions(yargs)
202
+ }, async (argv) => {
203
+ argv = {
204
+ ...argv,
205
+ withServices: true, updateServices: true,
206
+ withDb: true, createDb: true
207
+ }
208
+ await setupApp({...argv, uidBorders: '[]'})
209
+ await apiServer(argv)
210
+ })
199
211
  .command('ssrServer', 'start ssr server', (yargs) => {
200
212
  ssrServerOptions(yargs)
201
213
  apiServerOptions(yargs)
@@ -391,7 +403,7 @@ export async function apiServer(argv) {
391
403
 
392
404
  const { apiPort, apiHost } = argv
393
405
 
394
- const apiServer = await setupApiServer(argv)
406
+ const apiServer = await setupApiServer({ ...argv, fastAuth: true })
395
407
 
396
408
  const expressApp = express()
397
409
 
@@ -403,7 +415,7 @@ export async function apiServer(argv) {
403
415
  setupApiSockJs(httpServer, apiServer)
404
416
 
405
417
  httpServer.listen(apiPort, apiHost)
406
- console.log('Listening on port ' + apiPort)
418
+ console.log(`Api server listening on ${apiHost}:${apiPort}`)
407
419
  }
408
420
 
409
421
  export async function server(argv, dev) {
@@ -427,7 +439,7 @@ export async function server(argv, dev) {
427
439
 
428
440
  if(!argv.withApi) {
429
441
  const apiServerHost = (argv.apiHost === '0.0.0.0' ? 'localhost' : argv.apiHost) + ':' + argv.apiPort
430
- const target = `http://${apiServerHost}/`
442
+ const target = `http://${apiServerHost}/`
431
443
  const apiProxy = createProxyMiddleware({
432
444
  target,
433
445
  changeOrigin: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/cli",
3
- "version": "0.9.44",
3
+ "version": "0.9.45",
4
4
  "description": "Live Change Framework - command line interface",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,12 +25,12 @@
25
25
  "type": "module",
26
26
  "homepage": "https://github.com/live-change/live-change-stack",
27
27
  "dependencies": {
28
- "@live-change/dao": "^0.9.44",
29
- "@live-change/dao-sockjs": "^0.9.44",
30
- "@live-change/dao-websocket": "^0.9.44",
31
- "@live-change/db-server": "^0.9.44",
32
- "@live-change/framework": "^0.9.44",
33
- "@live-change/server": "^0.9.44",
28
+ "@live-change/dao": "^0.9.45",
29
+ "@live-change/dao-sockjs": "^0.9.45",
30
+ "@live-change/dao-websocket": "^0.9.45",
31
+ "@live-change/db-server": "^0.9.45",
32
+ "@live-change/framework": "^0.9.45",
33
+ "@live-change/server": "^0.9.45",
34
34
  "dotenv": "^16.4.4",
35
35
  "express": "^4.18.2",
36
36
  "http-proxy-middleware": "2.0.6",
@@ -40,5 +40,5 @@
40
40
  "websocket": "^1.0.34",
41
41
  "yargs": "^17.7.2"
42
42
  },
43
- "gitHead": "6e9cf980b2ac6e4e7d78955cbf97ae1c2963bcab"
43
+ "gitHead": "cc49c034ca5538efdb5c43d87041367d39a3d63f"
44
44
  }