@steedos/service-enterprise 3.0.0-beta.112 → 3.0.0-beta.114
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/package.json +6 -6
- package/package.service.js +17 -2
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-enterprise",
|
|
3
3
|
"main": "package.service.js",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.114",
|
|
5
5
|
"repository": "https://github.com/steedos/steedos-platform.git",
|
|
6
6
|
"description": "",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=14"
|
|
9
|
-
},
|
|
10
7
|
"author": "steedos",
|
|
11
8
|
"license": "MIT",
|
|
12
9
|
"dependencies": {
|
|
13
|
-
"@steedos/
|
|
10
|
+
"@steedos-labs/analytics": "^3.0.11",
|
|
11
|
+
"@steedos-labs/plugin-print-template": "^3.0.0",
|
|
12
|
+
"@steedos-labs/plugin-workflow": "^3.0.0",
|
|
13
|
+
"@steedos/ee_branding": "3.0.0-beta.114",
|
|
14
14
|
"@steedos/service-license": "3.0.0",
|
|
15
15
|
"mssql": "^11.0.1",
|
|
16
16
|
"oracledb": "^6.8.0"
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "abf9b93e8bed4456de266998961f99a6f3eec97f"
|
|
23
23
|
}
|
package/package.service.js
CHANGED
|
@@ -10,6 +10,13 @@ const project = require('./package.json');
|
|
|
10
10
|
const serviceName = project.name;
|
|
11
11
|
const validator = require('validator');
|
|
12
12
|
const _ = require('lodash');
|
|
13
|
+
|
|
14
|
+
const DEFAULT_PLUGINS = [
|
|
15
|
+
"@steedos/ee_branding",
|
|
16
|
+
"@steedos-labs/analytics",
|
|
17
|
+
"@steedos-labs/plugin-workflow",
|
|
18
|
+
"@steedos-labs/plugin-print-template"
|
|
19
|
+
]
|
|
13
20
|
/**
|
|
14
21
|
* @typedef {import('moleculer').Context} Context Moleculer's Context
|
|
15
22
|
* 软件包服务启动后也需要抛出事件。
|
|
@@ -25,6 +32,7 @@ module.exports = {
|
|
|
25
32
|
path: __dirname,
|
|
26
33
|
name: serviceName
|
|
27
34
|
},
|
|
35
|
+
plugins: process.env.STEEDOS_PLUGIN_SERVICES ? process.env.STEEDOS_PLUGIN_SERVICES.split(',') : DEFAULT_PLUGINS,
|
|
28
36
|
},
|
|
29
37
|
|
|
30
38
|
/**
|
|
@@ -72,8 +80,15 @@ module.exports = {
|
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
|
|
75
|
-
this.
|
|
76
|
-
|
|
83
|
+
const steedosPlugins = this.settings.plugins;
|
|
84
|
+
for (const plugin of steedosPlugins) {
|
|
85
|
+
try {
|
|
86
|
+
console.log(`Starting plugin service: ${plugin}`);
|
|
87
|
+
await this.broker.createService(require(plugin));
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.error(`Failed to start plugin service: ${plugin}`, error);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
77
92
|
},
|
|
78
93
|
|
|
79
94
|
/**
|