@steedos/service-enterprise 3.0.0-beta.99 → 3.0.1

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/package.json +7 -8
  2. package/package.service.js +17 -2
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@steedos/service-enterprise",
3
3
  "main": "package.service.js",
4
- "version": "3.0.0-beta.99",
5
- "private": false,
4
+ "version": "3.0.1",
6
5
  "repository": "https://github.com/steedos/steedos-platform.git",
7
6
  "description": "",
8
- "engines": {
9
- "node": ">=14"
10
- },
11
7
  "author": "steedos",
12
8
  "license": "MIT",
13
9
  "dependencies": {
14
- "@steedos/ee_branding": "3.0.0-beta.99",
15
- "@steedos/service-license": "3.0.0-beta.2",
10
+ "@steedos-labs/analytics": "^3.1.1",
11
+ "@steedos-labs/plugin-print-template": "^3.0.2",
12
+ "@steedos-labs/plugin-workflow": "^3.0.1-beta.5",
13
+ "@steedos/ee_branding": "3.0.1",
14
+ "@steedos/service-license": "3.0.0",
16
15
  "mssql": "^11.0.1",
17
16
  "oracledb": "^6.8.0"
18
17
  },
@@ -20,5 +19,5 @@
20
19
  "publishConfig": {
21
20
  "access": "public"
22
21
  },
23
- "gitHead": "a0e9d5ee78766e54048a385b7677f6916aa287c4"
22
+ "gitHead": "4bbcc1f1ba098d299f5c363e67679f001f715575"
24
23
  }
@@ -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.broker.createService(require("@steedos/ee_branding"));
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
  /**