@kronos-integration/service 11.2.8 → 11.2.10

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.8",
3
+ "version": "11.2.10",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -36,7 +36,7 @@
36
36
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
37
37
  },
38
38
  "dependencies": {
39
- "@kronos-integration/endpoint": "^9.5.6",
39
+ "@kronos-integration/endpoint": "^9.5.7",
40
40
  "@kronos-integration/interceptor": "^10.3.4",
41
41
  "loglevel-mixin": "^7.2.5",
42
42
  "model-attributes": "^4.2.4",
@@ -93,6 +93,9 @@ export class ServiceConfig extends Service {
93
93
  );
94
94
  }
95
95
 
96
+ async getCredential(key) {
97
+ }
98
+
96
99
  /**
97
100
  * We always start immediate.
98
101
  * @return {boolean} true
@@ -129,7 +132,7 @@ export function merge(a, b) {
129
132
  return b;
130
133
  }
131
134
 
132
- if (b.constructor && b.constructor.name === "Buffer") {
135
+ if (b.constructor?.name === "Buffer") {
133
136
  return b;
134
137
  }
135
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;
@@ -36,5 +36,6 @@ export class ServiceConfig extends Service {
36
36
  * @param {Array|Object} config
37
37
  */
38
38
  configure(config: any[] | any): Promise<void>;
39
+ getCredential(key: any): Promise<void>;
39
40
  }
40
41
  import { Service } from "./service.mjs";
@@ -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>;