@kronos-integration/service 10.4.44 → 10.4.46
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/README.md +16 -27
- package/package.json +7 -7
- package/src/service.mjs +4 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@kronos-integration/service)
|
|
2
2
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
3
|
-
[](https://bundlejs.com/?q=@kronos-integration/service)
|
|
4
4
|
[](https://npmjs.org/package/@kronos-integration/service)
|
|
5
5
|
[](https://github.com/Kronos-Integration/service/issues)
|
|
6
6
|
[](https://actions-badge.atrox.dev/Kronos-Integration/service/goto)
|
|
@@ -23,38 +23,36 @@ Base service implementation
|
|
|
23
23
|
* [Parameters](#parameters)
|
|
24
24
|
* [endpoints](#endpoints)
|
|
25
25
|
* [ServiceConfig](#serviceconfig)
|
|
26
|
-
* [Parameters](#parameters-1)
|
|
27
26
|
* [Properties](#properties)
|
|
28
27
|
* [configFor](#configfor)
|
|
29
|
-
* [Parameters](#parameters-
|
|
28
|
+
* [Parameters](#parameters-1)
|
|
30
29
|
* [clearPreserved](#clearpreserved)
|
|
31
|
-
* [Parameters](#parameters-
|
|
30
|
+
* [Parameters](#parameters-2)
|
|
32
31
|
* [configureValue](#configurevalue)
|
|
33
|
-
* [Parameters](#parameters-
|
|
32
|
+
* [Parameters](#parameters-3)
|
|
34
33
|
* [configure](#configure)
|
|
35
|
-
* [Parameters](#parameters-
|
|
34
|
+
* [Parameters](#parameters-4)
|
|
36
35
|
* [autostart](#autostart)
|
|
37
36
|
* [name](#name)
|
|
38
37
|
* [merge](#merge)
|
|
39
|
-
* [Parameters](#parameters-
|
|
38
|
+
* [Parameters](#parameters-5)
|
|
40
39
|
* [defineServiceConsumerProperties](#defineserviceconsumerproperties)
|
|
41
|
-
* [Parameters](#parameters-
|
|
40
|
+
* [Parameters](#parameters-6)
|
|
42
41
|
* [ServiceLogger](#servicelogger)
|
|
43
42
|
* [autostart](#autostart-1)
|
|
44
43
|
* [name](#name-1)
|
|
45
44
|
* [endpoints](#endpoints-1)
|
|
46
45
|
* [ServiceProviderMixin](#serviceprovidermixin)
|
|
47
|
-
* [Parameters](#parameters-
|
|
48
|
-
* [DESCRIPTION](#description)
|
|
46
|
+
* [Parameters](#parameters-7)
|
|
49
47
|
* [Service](#service)
|
|
50
|
-
* [Parameters](#parameters-
|
|
48
|
+
* [Parameters](#parameters-8)
|
|
51
49
|
* [extendetName](#extendetname)
|
|
52
50
|
* [stateChanged](#statechanged)
|
|
53
|
-
* [Parameters](#parameters-
|
|
51
|
+
* [Parameters](#parameters-9)
|
|
54
52
|
* [rejectWrongState](#rejectwrongstate)
|
|
55
|
-
* [Parameters](#parameters-
|
|
53
|
+
* [Parameters](#parameters-10)
|
|
56
54
|
* [timeoutForTransition](#timeoutfortransition)
|
|
57
|
-
* [Parameters](#parameters-
|
|
55
|
+
* [Parameters](#parameters-11)
|
|
58
56
|
* [\_start](#_start)
|
|
59
57
|
* [\_stop](#_stop)
|
|
60
58
|
* [\_restart](#_restart)
|
|
@@ -63,15 +61,15 @@ Base service implementation
|
|
|
63
61
|
* [isServiceProvider](#isserviceprovider)
|
|
64
62
|
* [toString](#tostring)
|
|
65
63
|
* [toJSONWithOptions](#tojsonwithoptions)
|
|
66
|
-
* [Parameters](#parameters-
|
|
64
|
+
* [Parameters](#parameters-12)
|
|
67
65
|
* [name](#name-2)
|
|
68
66
|
* [autostart](#autostart-2)
|
|
69
67
|
* [\_configure](#_configure)
|
|
70
|
-
* [Parameters](#parameters-
|
|
68
|
+
* [Parameters](#parameters-13)
|
|
71
69
|
* [configure](#configure-1)
|
|
72
|
-
* [Parameters](#parameters-
|
|
70
|
+
* [Parameters](#parameters-14)
|
|
73
71
|
* [log](#log)
|
|
74
|
-
* [Parameters](#parameters-
|
|
72
|
+
* [Parameters](#parameters-15)
|
|
75
73
|
* [configurationAttributes](#configurationattributes)
|
|
76
74
|
* [endpoints](#endpoints-2)
|
|
77
75
|
* [StandaloneServiceProvider](#standaloneserviceprovider)
|
|
@@ -102,11 +100,6 @@ Config providing service.
|
|
|
102
100
|
Dispatches config requests to services;
|
|
103
101
|
or preserves them until a maching service becomes avaliable.
|
|
104
102
|
|
|
105
|
-
### Parameters
|
|
106
|
-
|
|
107
|
-
* `config`  
|
|
108
|
-
* `ic`  
|
|
109
|
-
|
|
110
103
|
### Properties
|
|
111
104
|
|
|
112
105
|
* `preservedConfigs` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** values for services not already established
|
|
@@ -210,10 +203,6 @@ By default a service provider has two build in services
|
|
|
210
203
|
* `serviceLoggerClass` **Class** where the logging houtd go (optional, default `ServiceLogger`)
|
|
211
204
|
* `serviceConfigClass` **Class** where the config comes from (optional, default `ServiceConfig`)
|
|
212
205
|
|
|
213
|
-
## DESCRIPTION
|
|
214
|
-
|
|
215
|
-
Key of the service description.
|
|
216
|
-
|
|
217
206
|
## Service
|
|
218
207
|
|
|
219
208
|
**Extends EndpointsMixin(StateTransitionMixin(LogLevelMixin(class {}), prepareActions({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/service",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.46",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"loglevel-mixin": "^7.0.1",
|
|
35
35
|
"model-attributes": "^4.2.2",
|
|
36
36
|
"remove-sensible-values": "^1.2.3",
|
|
37
|
-
"statetransition-mixin": "^8.0.
|
|
37
|
+
"statetransition-mixin": "^8.0.5"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"ava": "^5.
|
|
41
|
-
"c8": "^
|
|
42
|
-
"documentation": "^14.0.
|
|
43
|
-
"semantic-release": "^
|
|
40
|
+
"ava": "^5.3.1",
|
|
41
|
+
"c8": "^8.0.0",
|
|
42
|
+
"documentation": "^14.0.2",
|
|
43
|
+
"semantic-release": "^21.0.5"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
46
|
+
"node": ">=20.3.1"
|
|
47
47
|
},
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
package/src/service.mjs
CHANGED
|
@@ -7,11 +7,6 @@ import {
|
|
|
7
7
|
} from "model-attributes";
|
|
8
8
|
import { EndpointsMixin } from "./endpoints-mixin.mjs";
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Key of the service description.
|
|
12
|
-
*/
|
|
13
|
-
const DESCRIPTION = Symbol("description");
|
|
14
|
-
|
|
15
10
|
const _ca = createAttributes({
|
|
16
11
|
description: {
|
|
17
12
|
type: "string",
|
|
@@ -146,6 +141,8 @@ export class Service extends EndpointsMixin(
|
|
|
146
141
|
};
|
|
147
142
|
}
|
|
148
143
|
|
|
144
|
+
#description;
|
|
145
|
+
|
|
149
146
|
constructor(config, ic) {
|
|
150
147
|
super();
|
|
151
148
|
|
|
@@ -192,11 +189,11 @@ export class Service extends EndpointsMixin(
|
|
|
192
189
|
}
|
|
193
190
|
|
|
194
191
|
get description() {
|
|
195
|
-
return this
|
|
192
|
+
return this.#description || this.constructor.description;
|
|
196
193
|
}
|
|
197
194
|
|
|
198
195
|
set description(desc) {
|
|
199
|
-
this
|
|
196
|
+
this.#description = desc;
|
|
200
197
|
}
|
|
201
198
|
|
|
202
199
|
/**
|