@mimik/init 5.0.1 → 5.0.3

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/index.js +19 -2
  2. package/package.json +20 -21
package/index.js CHANGED
@@ -152,8 +152,25 @@ module.exports = (app, rootDir, config, validates, cluster, options) => {
152
152
  .then(() => {
153
153
  server.listen(serverPort, () => {
154
154
  startupHealthInfo(config, correlationIdStart);
155
- if (registration) register(correlationIdStart);
156
- if (options && options.postOps) options.postOps.forEach((ops) => ops(correlationIdStart, config, server));
155
+ const afterPostOps = config.registration.afterPostOpsSet === SET_ON;
156
+
157
+ return Promise.resolve()
158
+ .then(() => {
159
+ if (afterPostOps) {
160
+ if (options && options.postOps) return Promise.each(options.postOps, (ops) => ops(correlationIdStart, config, server));
161
+ return null;
162
+ }
163
+ if (registration) return register(correlationIdStart);
164
+ return null;
165
+ })
166
+ .then(() => {
167
+ if (afterPostOps) {
168
+ if (registration) return register(correlationIdStart);
169
+ return null;
170
+ }
171
+ if (options && options.postOps) return Promise.each(options.postOps, (ops) => ops(correlationIdStart, config, server));
172
+ return null;
173
+ });
157
174
  });
158
175
  });
159
176
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/init",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Init process for micro-service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,30 +29,29 @@
29
29
  "url": "https://bitbucket.org/mimiktech/init"
30
30
  },
31
31
  "dependencies": {
32
- "@mimik/address-helper": "^1.6.9",
33
- "@mimik/api-helper": "^1.0.1",
34
- "@mimik/healthcheck": "^1.5.10",
35
- "@mimik/oauth-helper": "^3.0.0",
36
- "@mimik/public-helper": "^2.0.0",
37
- "@mimik/request-helper": "^1.7.8",
38
- "@mimik/response-helper": "^3.0.0",
39
- "@mimik/sumologic-winston-logger": "^1.6.15",
40
- "@mimik/systeminfo": "^3.0.0",
32
+ "@mimik/address-helper": "^1.6.10",
33
+ "@mimik/api-helper": "^1.0.3",
34
+ "@mimik/healthcheck": "^1.5.11",
35
+ "@mimik/oauth-helper": "^3.0.1",
36
+ "@mimik/public-helper": "^2.0.1",
37
+ "@mimik/request-helper": "^1.7.10",
38
+ "@mimik/response-helper": "^3.1.0",
39
+ "@mimik/sumologic-winston-logger": "^1.6.21",
40
+ "@mimik/systeminfo": "^3.0.1",
41
41
  "bluebird": "3.7.2",
42
42
  "cors": "2.8.5",
43
- "helmet": "6.1.5",
44
- "swagger-tools": "0.10.4"
43
+ "helmet": "7.1.0"
45
44
  },
46
45
  "devDependencies": {
47
- "@mimik/eslint-plugin-dependencies": "^2.4.5",
48
- "@mimik/eslint-plugin-document-env": "^1.0.5",
49
- "eslint": "8.39.0",
46
+ "@mimik/eslint-plugin-dependencies": "^2.4.6",
47
+ "@mimik/eslint-plugin-document-env": "^1.0.6",
48
+ "eslint": "8.57.0",
50
49
  "eslint-config-airbnb": "19.0.4",
51
- "eslint-plugin-import": "2.27.5",
52
- "eslint-plugin-jsx-a11y": "6.7.1",
53
- "eslint-plugin-react": "7.32.2",
54
- "eslint-plugin-react-hooks": "4.6.0",
55
- "husky": "8.0.3",
56
- "jsdoc-to-markdown": "8.0.0"
50
+ "eslint-plugin-import": "2.29.1",
51
+ "eslint-plugin-jsx-a11y": "6.8.0",
52
+ "eslint-plugin-react": "7.34.2",
53
+ "eslint-plugin-react-hooks": "4.6.2",
54
+ "husky": "9.0.11",
55
+ "jsdoc-to-markdown": "8.0.1"
57
56
  }
58
57
  }