@kronos-integration/service
Advanced tools
Comparing version 10.4.32 to 10.4.33
{ | ||
"name": "@kronos-integration/service", | ||
"version": "10.4.32", | ||
"version": "10.4.33", | ||
"publishConfig": { | ||
@@ -36,10 +36,10 @@ "access": "public" | ||
"model-attributes": "^4.1.19", | ||
"remove-sensible-values": "^1.1.0", | ||
"remove-sensible-values": "^1.2.0", | ||
"statetransition-mixin": "^8.0.2" | ||
}, | ||
"devDependencies": { | ||
"ava": "^4.3.1", | ||
"ava": "^4.3.3", | ||
"c8": "^7.12.0", | ||
"documentation": "^14.0.0", | ||
"semantic-release": "^19.0.4" | ||
"semantic-release": "^19.0.5" | ||
}, | ||
@@ -46,0 +46,0 @@ "engines": { |
149
README.md
@@ -25,24 +25,19 @@ [![npm](https://img.shields.io/npm/v/@kronos-integration/service.svg)](https://www.npmjs.com/package/@kronos-integration/service) | ||
* [endpoints](#endpoints) | ||
* [InitializationContext](#initializationcontext) | ||
* [InitializationContext](#initializationcontext-1) | ||
* [ServiceConfig](#serviceconfig) | ||
* [Parameters](#parameters-1) | ||
* [Properties](#properties) | ||
* [serviceProvider](#serviceprovider) | ||
* [ServiceConfig](#serviceconfig) | ||
* [Parameters](#parameters-2) | ||
* [Properties](#properties-1) | ||
* [configFor](#configfor) | ||
* [Parameters](#parameters-2) | ||
* [clearPreserved](#clearpreserved) | ||
* [Parameters](#parameters-3) | ||
* [clearPreserved](#clearpreserved) | ||
* [configureValue](#configurevalue) | ||
* [Parameters](#parameters-4) | ||
* [configureValue](#configurevalue) | ||
* [configure](#configure) | ||
* [Parameters](#parameters-5) | ||
* [configure](#configure) | ||
* [Parameters](#parameters-6) | ||
* [autostart](#autostart) | ||
* [name](#name) | ||
* [merge](#merge) | ||
* [Parameters](#parameters-6) | ||
* [defineServiceConsumerProperties](#defineserviceconsumerproperties) | ||
* [Parameters](#parameters-7) | ||
* [defineServiceConsumerProperties](#defineserviceconsumerproperties) | ||
* [Parameters](#parameters-8) | ||
* [ServiceLogger](#servicelogger) | ||
@@ -53,16 +48,16 @@ * [autostart](#autostart-1) | ||
* [ServiceProviderMixin](#serviceprovidermixin) | ||
* [Parameters](#parameters-9) | ||
* [Parameters](#parameters-8) | ||
* [DESCRIPTION](#description) | ||
* [Service](#service) | ||
* [Parameters](#parameters-10) | ||
* [Parameters](#parameters-9) | ||
* [extendetName](#extendetname) | ||
* [stateChanged](#statechanged) | ||
* [Parameters](#parameters-10) | ||
* [rejectWrongState](#rejectwrongstate) | ||
* [Parameters](#parameters-11) | ||
* [rejectWrongState](#rejectwrongstate) | ||
* [timeoutForTransition](#timeoutfortransition) | ||
* [Parameters](#parameters-12) | ||
* [timeoutForTransition](#timeoutfortransition) | ||
* [Parameters](#parameters-13) | ||
* [\_start](#\_start) | ||
* [\_stop](#\_stop) | ||
* [\_restart](#\_restart) | ||
* [\_start](#_start) | ||
* [\_stop](#_stop) | ||
* [\_restart](#_restart) | ||
* [restartIfRunning](#restartifrunning) | ||
@@ -73,11 +68,11 @@ * [toStringAttributes](#tostringattributes) | ||
* [toJSONWithOptions](#tojsonwithoptions) | ||
* [Parameters](#parameters-14) | ||
* [Parameters](#parameters-13) | ||
* [name](#name-2) | ||
* [autostart](#autostart-2) | ||
* [\_configure](#\_configure) | ||
* [\_configure](#_configure) | ||
* [Parameters](#parameters-14) | ||
* [configure](#configure-1) | ||
* [Parameters](#parameters-15) | ||
* [configure](#configure-1) | ||
* [log](#log) | ||
* [Parameters](#parameters-16) | ||
* [log](#log) | ||
* [Parameters](#parameters-17) | ||
* [configurationAttributes](#configurationattributes) | ||
@@ -105,25 +100,2 @@ * [endpoints](#endpoints-2) | ||
## InitializationContext | ||
Keeps track of all in flight object creations and loose ends during config initialization. | ||
## InitializationContext | ||
### Parameters | ||
* `serviceProvider` **ServiceProvider** | ||
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `options.logLevel` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
### Properties | ||
* `outstandingServices` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Service](#service)>>** | ||
* `outstandingFactories` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)>>** | ||
* `outstandingEndpointConnections` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<Endpoint>>** | ||
## serviceProvider | ||
if config belongs to the provider we represent ourselfs | ||
## ServiceConfig | ||
@@ -139,4 +111,4 @@ | ||
* `config` | ||
* `ic` | ||
* `config`   | ||
* `ic`   | ||
@@ -154,3 +126,3 @@ ### Properties | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** service name | ||
* `config` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `config` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -172,3 +144,3 @@ ### clearPreserved | ||
* `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to the value | ||
* `value` **any** | ||
* `value` **any**  | ||
@@ -179,3 +151,3 @@ ### configure | ||
* `config` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** | ||
* `config` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))**  | ||
@@ -199,4 +171,4 @@ ### autostart | ||
* `a` **any** | ||
* `b` **any** | ||
* `a` **any**  | ||
* `b` **any**  | ||
@@ -214,3 +186,3 @@ Returns **any** merged b into a | ||
* `provider` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** service provider | ||
* `waitUntilFactoryPresent` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ||
* `waitUntilFactoryPresent` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**  | ||
@@ -247,3 +219,3 @@ ## ServiceLogger | ||
* `superclass` | ||
* `superclass`   | ||
* `serviceLoggerClass` **Class** where the logging houtd go (optional, default `ServiceLogger`) | ||
@@ -259,18 +231,18 @@ * `serviceConfigClass` **Class** where the config comes from (optional, default `ServiceConfig`) | ||
**Extends EndpointsMixin(StateTransitionMixin(LogLevelMixin(class {}), prepareActions({ | ||
start: { | ||
stopped: rsfDefault | ||
}, | ||
restart: { | ||
stopped: rsfDefault, | ||
running: { | ||
target: "running", | ||
during: "restarting", | ||
timeout | ||
} | ||
}, | ||
stop: { | ||
running: ssfDefault, | ||
starting: ssfDefault, | ||
failed: ssfDefault | ||
} | ||
  start: { | ||
  stopped: rsfDefault | ||
  }, | ||
  restart: { | ||
  stopped: rsfDefault, | ||
  running: { | ||
  target: "running", | ||
  during: "restarting", | ||
  timeout | ||
  } | ||
  }, | ||
  stop: { | ||
  running: ssfDefault, | ||
  starting: ssfDefault, | ||
  failed: ssfDefault | ||
  } | ||
}), "stopped"))** | ||
@@ -288,10 +260,10 @@ | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
* `config.name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
* `config.logLevel` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
* `config.name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `config.logLevel` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `config.autostart` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** defaults to false | ||
* `config.description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** human readable description | ||
* `config.endpoints` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** will be merged with the build in ones | ||
* `ic` **[InitializationContext](#initializationcontext)** | ||
* `ic` **InitializationContext**  | ||
@@ -303,3 +275,3 @@ ### extendetName | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
@@ -313,5 +285,5 @@ ### stateChanged | ||
* `origin` | ||
* `oldState` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
* `newState` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
* `origin`   | ||
* `oldState` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `newState` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
@@ -336,3 +308,3 @@ ### rejectWrongState | ||
* `transition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `transition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -367,3 +339,3 @@ Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** milliseconds before throwing for a long running transition | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -388,3 +360,3 @@ ### isServiceProvider | ||
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -422,3 +394,3 @@ * `options.includeRuntimeInfo` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** include runtime informtion like state | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -436,3 +408,3 @@ Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)** of modified attributes | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
* `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
@@ -457,7 +429,6 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** fillfills when config is applied | ||
* setter(newValue,attribute) optional function to be used if simple value assignment is not enough | ||
The Service class only defines the logLevel, and start/stop/restart timeout attribute | ||
The Service class only defines the logLevel, and start/stop/restart timeout attribute | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
### endpoints | ||
@@ -464,0 +435,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56630
443