@kronos-integration/service 11.2.2 → 11.2.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.
- package/package.json +1 -1
- package/src/service.mjs +4 -7
package/package.json
CHANGED
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
|
|
372
|
-
const
|
|
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);
|