@kronos-integration/service 13.2.6 → 13.2.7
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": "13.2.
|
|
3
|
+
"version": "13.2.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -36,10 +36,10 @@
|
|
|
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": "^10.1.
|
|
40
|
-
"@kronos-integration/interceptor": "^12.1.
|
|
39
|
+
"@kronos-integration/endpoint": "^10.1.7",
|
|
40
|
+
"@kronos-integration/interceptor": "^12.1.8",
|
|
41
41
|
"loglevel-mixin": "^7.2.5",
|
|
42
|
-
"pacc": "^4.
|
|
42
|
+
"pacc": "^4.6.0",
|
|
43
43
|
"statetransition-mixin": "^8.1.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"c8": "^10.1.3",
|
|
48
48
|
"documentation": "^14.0.3",
|
|
49
49
|
"semantic-release": "^24.2.7",
|
|
50
|
-
"typescript": "^5.
|
|
50
|
+
"typescript": "^5.9.2"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
|
-
"node": ">=22.
|
|
53
|
+
"node": ">=22.18.0"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
|
@@ -168,11 +168,7 @@ export const InitializationContext = LogLevelMixin(
|
|
|
168
168
|
const sp = this.serviceProvider;
|
|
169
169
|
|
|
170
170
|
if (type instanceof Function) {
|
|
171
|
-
|
|
172
|
-
if (factory !== undefined) {
|
|
173
|
-
return factory;
|
|
174
|
-
}
|
|
175
|
-
return sp.registerServiceFactory(type);
|
|
171
|
+
return sp.serviceFactories[type.name] || sp.registerServiceFactory(type);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
174
|
const factory = sp.serviceFactories[type];
|
|
@@ -188,7 +184,7 @@ export const InitializationContext = LogLevelMixin(
|
|
|
188
184
|
if (this.waitForFactories) {
|
|
189
185
|
try {
|
|
190
186
|
const module = await import(type);
|
|
191
|
-
if (module.default
|
|
187
|
+
if (module.default?.prototype instanceof Service) {
|
|
192
188
|
sp.registerServiceFactory(type, module.default);
|
|
193
189
|
return module.default;
|
|
194
190
|
}
|
package/src/service.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getAttributes,
|
|
6
6
|
setAttributes,
|
|
7
7
|
description_attribute,
|
|
8
|
-
|
|
8
|
+
default_attribute_writable,
|
|
9
9
|
timeout_attribute
|
|
10
10
|
} from "pacc";
|
|
11
11
|
import { EndpointsMixin } from "./endpoints-mixin.mjs";
|
|
@@ -87,7 +87,7 @@ export class Service extends EndpointsMixin(
|
|
|
87
87
|
static attributes = prepareAttributesDefinitions({
|
|
88
88
|
description: description_attribute,
|
|
89
89
|
logLevel: {
|
|
90
|
-
...
|
|
90
|
+
...default_attribute_writable,
|
|
91
91
|
description: "logging level",
|
|
92
92
|
values: Object.keys(defaultLogLevels),
|
|
93
93
|
default: defaultLogLevels.info,
|
|
@@ -234,11 +234,7 @@ export class Service extends EndpointsMixin(
|
|
|
234
234
|
* @return {number} milliseconds before throwing for a long running transition
|
|
235
235
|
*/
|
|
236
236
|
timeoutForTransition(transition) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return timeout === undefined
|
|
240
|
-
? super.timeoutForTransition(transition)
|
|
241
|
-
: timeout * 1000;
|
|
237
|
+
return this.timeout[transition.name] * 1000 || super.timeoutForTransition(transition);
|
|
242
238
|
}
|
|
243
239
|
|
|
244
240
|
/**
|