@steedos/service-enterprise 2.5.0-beta.9 → 2.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos/service-enterprise",
3
3
  "main": "package.service.js",
4
- "version": "2.5.0-beta.9",
4
+ "version": "2.5.0",
5
5
  "private": false,
6
6
  "repository": "https://github.com/steedos/steedos-platform.git",
7
7
  "description": "",
@@ -11,22 +11,22 @@
11
11
  "author": "steedos",
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "@steedos/ee_audit-records": "2.5.0-beta.9",
15
- "@steedos/ee_branding": "2.5.0-beta.9",
16
- "@steedos/ee_mongodb-bi-connector": "2.5.0-beta.9",
17
- "@steedos/ee_service-plugin-license": "^2.2.5",
18
- "@steedos/ee_sso-oidc": "2.5.0-beta.9",
19
- "@steedos/ee_stimulsoft-reports": "2.5.0-beta.9",
20
- "@steedos/ee_virus-scan": "2.5.0-beta.9",
21
- "@steedos/service-community": "2.5.0-beta.9",
14
+ "@steedos/ee_audit-records": "2.5.0",
15
+ "@steedos/ee_branding": "2.5.0",
16
+ "@steedos/ee_mongodb-bi-connector": "2.5.0",
17
+ "@steedos/ee_plugin-field-encryption": "2.5.0",
18
+ "@steedos/plugin-dingtalk": "2.5.0",
19
+ "@steedos/plugin-qywx": "2.5.0",
20
+ "@steedos/service-package-license": "2.5.0",
22
21
  "mongodb": "^3.7.3",
23
22
  "mssql": "^8.1.2",
24
23
  "nats": "^1.4.12",
24
+ "notepack.io": "^3.0.1",
25
25
  "validator": "^13.6.0"
26
26
  },
27
27
  "homepage": "https://www.steedos.com",
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "a2623b433dd42632dc54d23c51b718bd4d1a2fdc"
31
+ "gitHead": "4428143293b96ef93b2bbeef0cd6691c9baa8e4f"
32
32
  }
@@ -1,7 +1,15 @@
1
+ /*
2
+ * @Author: baozhoutao@steedos.com
3
+ * @Date: 2023-05-17 15:06:55
4
+ * @LastEditors: baozhoutao@steedos.com
5
+ * @LastEditTime: 2023-06-15 09:29:54
6
+ * @Description:
7
+ */
1
8
  "use strict";
2
9
  const project = require('./package.json');
3
10
  const serviceName = project.name;
4
11
  const validator = require('validator');
12
+ const _ = require('lodash');
5
13
  /**
6
14
  * @typedef {import('moleculer').Context} Context Moleculer's Context
7
15
  * 软件包服务启动后也需要抛出事件。
@@ -25,7 +33,7 @@ module.exports = {
25
33
  /**
26
34
  * Dependencies
27
35
  */
28
- dependencies: [],
36
+ dependencies: ['steedos-server'],
29
37
  /**
30
38
  * Actions
31
39
  */
@@ -50,34 +58,50 @@ module.exports = {
50
58
  * Service created lifecycle event handler
51
59
  */
52
60
  async created() {
53
-
61
+ global.broker = this.broker;
54
62
  },
55
63
 
56
64
  /**
57
65
  * Service started lifecycle event handler
58
66
  */
59
67
  async started(ctx) {
60
- // 启动 社区版 服务
61
- this.broker.createService(require("@steedos/service-community"));
62
68
 
63
- // 启动 企业版许可证服务
64
- this.broker.createService(require("@steedos/ee_service-plugin-license"));
69
+ const service = this.broker.createService(require("@steedos/service-package-license"));
70
+ if (!this.broker.started) {
71
+ this.broker._restartService(service);
72
+ }
73
+
74
+ this.broker.waitForServices('@steedos/service-package-license').then(() => {
75
+ setTimeout(()=>{
76
+ // 如果环境变量中配置了
77
+ this.broker.call(`@steedos/service-package-license.hasEnvLicense`, {}).then((has)=>{
78
+ if(has){
79
+
80
+ const enterprisePackages = process.env.STEEDOS_ENTERPRISE_PACKAGES || '@steedos/ee_audit-records,@steedos/ee_branding';
65
81
 
66
- // 启动 报表服务
67
- this.broker.createService(require("@steedos/ee_stimulsoft-reports"));
82
+ const packages = enterprisePackages.split(',');
68
83
 
69
- // 启动 sidecar服务: steedos services 跨语言访问
70
- // broker.createService(require("@steedos/service-sidecar"));
71
- // 字段级加密服务
72
- // broker.createService(require("@steedos/ee_plugin-field-encryption"));
73
- // 附件病毒扫描
74
- // broker.createService(require("@steedos/ee_virus-scan"));
75
- // 记录审计日志
76
- this.broker.createService(require("@steedos/ee_audit-records"));
77
- // 自定义品牌
78
- this.broker.createService(require("@steedos/ee_branding"));
79
- // mongodb bi connector
80
- // this.broker.createService(require("@steedos/ee_mongodb-bi-connector"));
84
+ packages.forEach((packageName)=>{
85
+ if(packageName && _.trim(packageName)){
86
+ this.broker.createService(require(_.trim(packageName)));
87
+ }
88
+ })
89
+ // // 记录审计日志
90
+ // this.broker.createService(require("@steedos/ee_audit-records"));
91
+ // // 自定义品牌
92
+ // this.broker.createService(require("@steedos/ee_branding"));
93
+ // // mongodb bi connector
94
+ // this.broker.createService(require("@steedos/ee_mongodb-bi-connector"));
95
+ // // 字段级加密服务
96
+ // this.broker.createService(require("@steedos/ee_plugin-field-encryption"));
97
+ // //企业微信
98
+ // this.broker.createService(require("@steedos/plugin-qywx"));
99
+ // //钉钉
100
+ // this.broker.createService(require("@steedos/plugin-dingtalk"));
101
+ }
102
+ })
103
+ }, 3000)
104
+ })
81
105
  },
82
106
 
83
107
  /**
@@ -86,4 +110,4 @@ module.exports = {
86
110
  async stopped() {
87
111
 
88
112
  }
89
- };
113
+ };
package/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Steedos Licensing
2
-
3
- SOFTWARE LICENSING
4
-
5
- To determine under which license you may use a file from the Steedos source code,
6
- please resort to the header of that file.
7
-
8
- If the file has no header, the following rules apply
9
- 1. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
10
- 2. source code that is neither (1) is licensed under MIT, see https://opensource.org/licenses/MIT
11
-
12
- On request, licenses under different terms are available.
13
-
14
- Source code of enterprise features are files that
15
- * are in folders named "ee" or start with "ee_", or in subfolders of such folders.
16
- * contain the strings "ee_" in its filename name.
17
- The files can be found by running the command `find . -iname ee -or -iname "*_ee*" -or -iname "*ee_*"`
18
-
19
- STEEDOS TRADEMARK GUIDELINES
20
-
21
- Your use of the mark Steedos is subject to Steedos, Inc's prior written approval. For trademark approval or any questions
22
- you have about using these trademarks, please email zhuangjianguo@steedos.com