@live-change/cli 0.8.5 → 0.8.7

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 +21 -2
  2. package/package.json +8 -8
package/lib/starter.js CHANGED
@@ -26,6 +26,8 @@ import {
26
26
 
27
27
  } from "@live-change/server"
28
28
 
29
+ import { DaoCache } from '@live-change/dao'
30
+
29
31
  process.on('unhandledRejection', (reason, p) => {
30
32
  console.log('Unhandled Rejection at: Promise', p, 'reason:', reason)
31
33
  })
@@ -266,6 +268,15 @@ async function describe(argv) {
266
268
  const model = service.models[modelName]
267
269
  const properties = Object.keys(model.properties ?? {})
268
270
  console.log(" ", modelName, "(", properties.join(', '), ")")
271
+ for(const indexName in model.indexes) {
272
+ const index = model.indexes[indexName]
273
+ console.log(" ", indexName)
274
+ }
275
+ }
276
+ console.log(" indexes:")
277
+ for(const indexName in service.indexes) {
278
+ const index = service.indexes[indexName]
279
+ console.log(" ", indexName)
269
280
  }
270
281
  console.log(" actions:")
271
282
  for(const actionName in service.actions) {
@@ -277,7 +288,14 @@ async function describe(argv) {
277
288
  for(const viewName in service.views) {
278
289
  const view = service.views[viewName]
279
290
  const properties = Object.keys(view.properties ?? {})
280
- console.log(" ", viewName, "(", properties.join(', '), ")")
291
+ console.log(" ", viewName, "(", properties.join(', '), ")",
292
+ view.global ? "global" : "", view.internal ? "internal" : "", view.remote ? "remote" : "")
293
+ }
294
+ console.log(" triggers:")
295
+ for(const triggerName in service.triggers) {
296
+ const trigger = service.triggers[triggerName]
297
+ const properties = Object.keys(trigger.properties ?? {})
298
+ console.log(" ", triggerName, "(", properties.join(', '), ")")
281
299
  }
282
300
  console.log(" events:")
283
301
  for(const eventName in service.events) {
@@ -357,6 +375,8 @@ async function server(argv, dev) {
357
375
  await setupApiEndpoints(expressApp, apiServer)
358
376
  }
359
377
 
378
+ if(argv.appCache || process.env.APP_CACHE === "YES") app.dao = new DaoCache(app.dao)
379
+
360
380
  console.log("ENDPOINTS INSTALLED! CREATING WEB SERVER!")
361
381
 
362
382
  const ssrServer = new SsrServer(expressApp, manifest, {
@@ -377,7 +397,6 @@ async function server(argv, dev) {
377
397
  })
378
398
  await ssrServer.start()
379
399
 
380
-
381
400
  console.log("SSR INSTALLED! CREATING HTTP SERVER!")
382
401
 
383
402
  const httpServer = http.createServer(expressApp)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/cli",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
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-framework",
27
27
  "dependencies": {
28
- "@live-change/dao": "^0.8.5",
29
- "@live-change/dao-sockjs": "0.8.2",
30
- "@live-change/dao-websocket": "0.8.2",
31
- "@live-change/db-server": "^0.8.5",
32
- "@live-change/framework": "0.8.2",
33
- "@live-change/server": "^0.8.5",
28
+ "@live-change/dao": "^0.8.7",
29
+ "@live-change/dao-sockjs": "^0.8.7",
30
+ "@live-change/dao-websocket": "^0.8.7",
31
+ "@live-change/db-server": "^0.8.7",
32
+ "@live-change/framework": "^0.8.7",
33
+ "@live-change/server": "^0.8.7",
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": "40f20811c2b0b4f9f99cd079dc570053d94869e3"
43
+ "gitHead": "b00392ddc91b273e8e7b6d2bdf543f8fe0aec0ca"
44
44
  }