@mimik/init 6.1.0 → 6.1.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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +3 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ```js
6
6
  import init from '@mimik/init';
7
7
 
8
- init(app, rootDir, config, [dbValidate], cluster, { postOps: [subscribe] }).then(result => config = result);
8
+ init(app, rootDir, config, [dbValidate], cluster, { postOps: [subscribe] }).then(({ config: c }) => config = c);
9
9
  ```
10
10
  <a name="module_init..init"></a>
11
11
 
package/index.js CHANGED
@@ -28,7 +28,7 @@ import { startupHealthInfo } from '@mimik/healthcheck';
28
28
  * @example
29
29
  * import init from '@mimik/init';
30
30
  *
31
- * init(app, rootDir, config, [dbValidate], cluster, { postOps: [subscribe] }).then(result => config = result);
31
+ * init(app, rootDir, config, [dbValidate], cluster, { postOps: [subscribe] }).then(({ config: c }) => config = c);
32
32
  *
33
33
  */
34
34
 
@@ -167,9 +167,8 @@ const init = (app, rootDir, config, validates, cluster, options) => {
167
167
  });
168
168
  // end of deprecation
169
169
  return import(pathLib.resolve(buildRequire))
170
- .then((registeredOperationsModule) => {
171
- const api = apiSetup(setupResult, registeredOperationsModule, options?.secOptions, options?.formats, config, correlationIdStart);
172
-
170
+ .then(registeredOperationsModule => apiSetup(setupResult, registeredOperationsModule, options?.secOptions, options?.formats, config, correlationIdStart))
171
+ .then((api) => {
173
172
  app.use((req, res) => api.handleRequest(req, req, res));
174
173
  return Promise.each(validates, validate => validate())
175
174
  .then(() => getPublic(config.locationProvider, config.cloudProvider, correlationIdStart, options).then((publicConfig) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/init",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "Init process for micro-service",
5
5
  "main": "./index.js",
6
6
  "type": "module",