@kronos-integration/service 11.2.2 → 11.2.4

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 +2 -2
  2. package/src/service.mjs +4 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service",
3
- "version": "11.2.2",
3
+ "version": "11.2.4",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@kronos-integration/endpoint": "^9.5.6",
40
40
  "@kronos-integration/interceptor": "^10.3.2",
41
- "loglevel-mixin": "^7.2.2",
41
+ "loglevel-mixin": "^7.2.3",
42
42
  "model-attributes": "^4.2.2",
43
43
  "remove-sensible-values": "^1.3.1",
44
44
  "statetransition-mixin": "^8.1.0"
package/src/service.mjs CHANGED
@@ -79,7 +79,7 @@ const ssfDefault = {
79
79
  * @param {string} config.description human readable description
80
80
  * @param {Object} config.endpoints will be merged with the build in ones
81
81
  * @param {InitializationContext} ic
82
- *
82
+ *
83
83
  * @property {Object} endpoints
84
84
  */
85
85
  export class Service extends EndpointsMixin(
@@ -368,16 +368,13 @@ export class Service extends EndpointsMixin(
368
368
  Object.assign(json, atts);
369
369
  }
370
370
 
371
- for (const endpointName in this.endpoints) {
372
- const ep = this.endpoints[endpointName];
373
-
374
- function add(ep) {
371
+ for (const [endpointName, ep] of Object.entries(this.endpoints)) {
372
+ const add = ep => {
375
373
  if (json.endpoints === undefined) {
376
374
  json.endpoints = {};
377
375
  }
378
376
  json.endpoints[endpointName] = ep.toJSONWithOptions(options);
379
- }
380
-
377
+ };
381
378
  if (ep.isDefault) {
382
379
  if (options.includeDefaults) {
383
380
  add(ep);