@live-change/server 0.9.61 → 0.9.62

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/Services.js +22 -12
  2. package/package.json +7 -7
package/lib/Services.js CHANGED
@@ -59,10 +59,15 @@ class Services {
59
59
  const definition = module
60
60
  this.plugins.push(definition)
61
61
  } else {
62
- const entryFile = await this.getServiceEntryFile(plugin)
63
- debug("PLUGIN", plugin, 'ENTRY FILE', entryFile)
64
- const module = await import(entryFile)
65
- this.plugins.push(module.default)
62
+ try {
63
+ const entryFile = await this.getServiceEntryFile(plugin)
64
+ debug("PLUGIN", plugin, 'ENTRY FILE', entryFile)
65
+ const module = await import(entryFile)
66
+ this.plugins.push(module.default)
67
+ } catch(e) {
68
+ console.error("ERROR LOADING PLUGIN", plugin)
69
+ throw e
70
+ }
66
71
  }
67
72
  }
68
73
  }
@@ -74,15 +79,20 @@ class Services {
74
79
  this.serviceDefinitions.push(definition)
75
80
  //console.log("SERVICE DEFINITION", definition, "OF", service)
76
81
  } else {
77
- const entryFile = await this.getServiceEntryFile(service)
78
- debug("SERVICE", service, 'ENTRY FILE', entryFile)
79
- const module = await import(entryFile)
80
- const definition = module.default
81
- if (definition.name !== service.name) {
82
- console.error("SERVICE", service, "NAME", service.name, "MISMATCH", definition.name)
83
- process.exit(1)
82
+ try {
83
+ const entryFile = await this.getServiceEntryFile(service)
84
+ debug("SERVICE", service, 'ENTRY FILE', entryFile)
85
+ const module = await import(entryFile)
86
+ const definition = module.default
87
+ if (definition.name !== service.name) {
88
+ console.error("SERVICE", service, "NAME", service.name, "MISMATCH", definition.name)
89
+ process.exit(1)
90
+ }
91
+ this.serviceDefinitions.push(definition)
92
+ } catch(e) {
93
+ console.error("ERROR LOADING SERVICE", service)
94
+ throw e
84
95
  }
85
- this.serviceDefinitions.push(definition)
86
96
  }
87
97
  }
88
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/server",
3
- "version": "0.9.61",
3
+ "version": "0.9.62",
4
4
  "description": "Live Change Framework - server",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,12 +22,12 @@
22
22
  "type": "module",
23
23
  "homepage": "https://github.com/live-change/live-change-stack",
24
24
  "dependencies": {
25
- "@live-change/dao": "^0.9.61",
26
- "@live-change/dao-sockjs": "^0.9.61",
27
- "@live-change/db-server": "^0.9.61",
28
- "@live-change/framework": "^0.9.61",
25
+ "@live-change/dao": "^0.9.62",
26
+ "@live-change/dao-sockjs": "^0.9.62",
27
+ "@live-change/db-server": "^0.9.62",
28
+ "@live-change/framework": "^0.9.62",
29
29
  "@live-change/sockjs": "0.4.1",
30
- "@live-change/uid": "^0.9.61",
30
+ "@live-change/uid": "^0.9.62",
31
31
  "dotenv": "^16.4.4",
32
32
  "express": "^4.18.2",
33
33
  "express-static-gzip": "2.1.7",
@@ -39,5 +39,5 @@
39
39
  "websocket": "^1.0.34",
40
40
  "yargs": "^17.7.2"
41
41
  },
42
- "gitHead": "f750f29f912b9a76b5ffa2bdf5c46954cc7e7a67"
42
+ "gitHead": "b1b605b7f1fa4fc3de4720afbb401e2cfff080cf"
43
43
  }