@kronos-integration/service 11.2.9 → 11.2.11

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service",
3
- "version": "11.2.9",
3
+ "version": "11.2.11",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -39,7 +39,7 @@
39
39
  "@kronos-integration/endpoint": "^9.5.7",
40
40
  "@kronos-integration/interceptor": "^10.3.4",
41
41
  "loglevel-mixin": "^7.2.5",
42
- "model-attributes": "^4.2.4",
42
+ "model-attributes": "^4.2.5",
43
43
  "remove-sensible-values": "^1.3.1",
44
44
  "statetransition-mixin": "^8.1.3"
45
45
  },
@@ -132,7 +132,7 @@ export function merge(a, b) {
132
132
  return b;
133
133
  }
134
134
 
135
- if (b.constructor && b.constructor.name === "Buffer") {
135
+ if (b.constructor?.name === "Buffer") {
136
136
  return b;
137
137
  }
138
138
 
@@ -128,7 +128,7 @@ export function ServiceProviderMixin(
128
128
  * Instanciates an interceptor from its definition data.
129
129
  * @see {interceptorFactories}
130
130
  * @param {Object} definition data
131
- * @returns {Interceptor}
131
+ * @returns {Interceptor|undefined}
132
132
  */
133
133
  instantiateInterceptor(definition) {
134
134
  const factory = this.interceptorFactories[definition.type];
package/src/util.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  export function keyValue2Object(key, value) {
2
2
  const path = key.split(/\./);
3
-
4
3
  const config = {};
5
4
 
6
5
  let c = config;
7
6
 
8
7
  do {
9
- let slot = path.shift();
8
+ const slot = path.shift();
10
9
  if (path.length === 0) {
11
10
  c[slot] = value;
12
11
  break;
@@ -46,9 +46,9 @@ export function ServiceProviderMixin(superclass: any, serviceLoggerClass?: new (
46
46
  * Instanciates an interceptor from its definition data.
47
47
  * @see {interceptorFactories}
48
48
  * @param {Object} definition data
49
- * @returns {Interceptor}
49
+ * @returns {Interceptor|undefined}
50
50
  */
51
- instantiateInterceptor(definition: any): Interceptor;
51
+ instantiateInterceptor(definition: any): Interceptor | undefined;
52
52
  serviceStateChanged(service: any, oldState: any, newState: any): void;
53
53
  registerServiceFactory(factory: any): Promise<any>;
54
54
  unregisterServiceFactory(factory: any): Promise<void>;
@@ -14,7 +14,7 @@ declare const StandaloneServiceProvider_base: {
14
14
  registerFactories(factories: [Function | string]): Promise<void>;
15
15
  registerInterceptorFactory(factory: new () => new () => /*elided*/ any): new () => new () => /*elided*/ any;
16
16
  unregisterInterceptorFactory(factory: any): void;
17
- instantiateInterceptor(definition: any): import("@kronos-integration/interceptor").Interceptor;
17
+ instantiateInterceptor(definition: any): import("@kronos-integration/interceptor").Interceptor | undefined;
18
18
  serviceStateChanged(service: any, oldState: any, newState: any): void;
19
19
  registerServiceFactory(factory: any): Promise<any>;
20
20
  unregisterServiceFactory(factory: any): Promise<void>;