@live-change/server 0.9.61 → 0.9.63
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/Services.js +22 -12
- 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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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.
|
|
3
|
+
"version": "0.9.63",
|
|
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.
|
|
26
|
-
"@live-change/dao-sockjs": "^0.9.
|
|
27
|
-
"@live-change/db-server": "^0.9.
|
|
28
|
-
"@live-change/framework": "^0.9.
|
|
25
|
+
"@live-change/dao": "^0.9.63",
|
|
26
|
+
"@live-change/dao-sockjs": "^0.9.63",
|
|
27
|
+
"@live-change/db-server": "^0.9.63",
|
|
28
|
+
"@live-change/framework": "^0.9.63",
|
|
29
29
|
"@live-change/sockjs": "0.4.1",
|
|
30
|
-
"@live-change/uid": "^0.9.
|
|
30
|
+
"@live-change/uid": "^0.9.63",
|
|
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": "
|
|
42
|
+
"gitHead": "89b9647aeaff9fc66add1f07d225fe4f44d91a39"
|
|
43
43
|
}
|