@live-change/cli 0.9.44 → 0.9.46
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/starter.js +17 -4
- package/package.json +8 -8
package/lib/starter.js
CHANGED
|
@@ -29,7 +29,8 @@ import {
|
|
|
29
29
|
import { DaoCache } from '@live-change/dao'
|
|
30
30
|
|
|
31
31
|
process.on('unhandledRejection', (reason, p) => {
|
|
32
|
-
console.error('Unhandled Rejection
|
|
32
|
+
console.error('Unhandled Rejection',
|
|
33
|
+
"reason", reason, "stack", reason.stack, "promise", promise)
|
|
33
34
|
})
|
|
34
35
|
|
|
35
36
|
process.on('uncaughtException', function (err) {
|
|
@@ -196,6 +197,18 @@ export default function starter(servicesConfig = null, args = {}) {
|
|
|
196
197
|
await setupApp({...argv, uidBorders: '[]'})
|
|
197
198
|
await apiServer(argv)
|
|
198
199
|
})
|
|
200
|
+
.command('localApiServer', 'shortcut for devApiServer --withServices --updateServices --withDb --createDb', (yargs) => {
|
|
201
|
+
apiServerOptions(yargs)
|
|
202
|
+
startOptions(yargs)
|
|
203
|
+
}, async (argv) => {
|
|
204
|
+
argv = {
|
|
205
|
+
...argv,
|
|
206
|
+
withServices: true, updateServices: true,
|
|
207
|
+
withDb: true, createDb: true
|
|
208
|
+
}
|
|
209
|
+
await setupApp({...argv, uidBorders: '[]'})
|
|
210
|
+
await apiServer(argv)
|
|
211
|
+
})
|
|
199
212
|
.command('ssrServer', 'start ssr server', (yargs) => {
|
|
200
213
|
ssrServerOptions(yargs)
|
|
201
214
|
apiServerOptions(yargs)
|
|
@@ -391,7 +404,7 @@ export async function apiServer(argv) {
|
|
|
391
404
|
|
|
392
405
|
const { apiPort, apiHost } = argv
|
|
393
406
|
|
|
394
|
-
const apiServer = await setupApiServer(argv)
|
|
407
|
+
const apiServer = await setupApiServer({ ...argv, fastAuth: true })
|
|
395
408
|
|
|
396
409
|
const expressApp = express()
|
|
397
410
|
|
|
@@ -403,7 +416,7 @@ export async function apiServer(argv) {
|
|
|
403
416
|
setupApiSockJs(httpServer, apiServer)
|
|
404
417
|
|
|
405
418
|
httpServer.listen(apiPort, apiHost)
|
|
406
|
-
console.log(
|
|
419
|
+
console.log(`Api server listening on ${apiHost}:${apiPort}`)
|
|
407
420
|
}
|
|
408
421
|
|
|
409
422
|
export async function server(argv, dev) {
|
|
@@ -427,7 +440,7 @@ export async function server(argv, dev) {
|
|
|
427
440
|
|
|
428
441
|
if(!argv.withApi) {
|
|
429
442
|
const apiServerHost = (argv.apiHost === '0.0.0.0' ? 'localhost' : argv.apiHost) + ':' + argv.apiPort
|
|
430
|
-
const target = `http://${apiServerHost}/`
|
|
443
|
+
const target = `http://${apiServerHost}/`
|
|
431
444
|
const apiProxy = createProxyMiddleware({
|
|
432
445
|
target,
|
|
433
446
|
changeOrigin: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.46",
|
|
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.
|
|
29
|
-
"@live-change/dao-sockjs": "^0.9.
|
|
30
|
-
"@live-change/dao-websocket": "^0.9.
|
|
31
|
-
"@live-change/db-server": "^0.9.
|
|
32
|
-
"@live-change/framework": "^0.9.
|
|
33
|
-
"@live-change/server": "^0.9.
|
|
28
|
+
"@live-change/dao": "^0.9.46",
|
|
29
|
+
"@live-change/dao-sockjs": "^0.9.46",
|
|
30
|
+
"@live-change/dao-websocket": "^0.9.46",
|
|
31
|
+
"@live-change/db-server": "^0.9.46",
|
|
32
|
+
"@live-change/framework": "^0.9.46",
|
|
33
|
+
"@live-change/server": "^0.9.46",
|
|
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": "
|
|
43
|
+
"gitHead": "9d2fe9cbfb28f6cd389c8cbc5cf051f583f58e9e"
|
|
44
44
|
}
|