@kronos-integration/endpoint 9.4.42 → 9.4.44
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 +1 -1
- package/package.json +9 -10
- package/src/endpoint.mjs +3 -3
- package/src/multi-connection-endpoint.mjs +2 -2
- package/src/receivable-endpoint.mjs +2 -2
- package/src/send-endpoint.mjs +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@kronos-integration/endpoint)
|
|
2
2
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
3
|
-
[](https://bundlejs.com/?q=@kronos-integration/endpoint)
|
|
4
4
|
[](https://npmjs.org/package/@kronos-integration/endpoint)
|
|
5
5
|
[](https://github.com/Kronos-Integration/endpoint/issues)
|
|
6
6
|
[](https://actions-badge.atrox.dev/Kronos-Integration/endpoint/goto)
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/endpoint",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.44",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"sideEffects": false,
|
|
8
7
|
"exports": {
|
|
9
8
|
".": "./src/module.mjs"
|
|
10
9
|
},
|
|
@@ -25,23 +24,23 @@
|
|
|
25
24
|
"license": "BSD-2-Clause",
|
|
26
25
|
"scripts": {
|
|
27
26
|
"test": "npm run test:ava",
|
|
28
|
-
"test:ava": "ava --timeout
|
|
29
|
-
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout
|
|
27
|
+
"test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
28
|
+
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
|
|
30
29
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
31
30
|
"lint": "npm run lint:docs",
|
|
32
31
|
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@kronos-integration/interceptor": "^10.2.
|
|
34
|
+
"@kronos-integration/interceptor": "^10.2.37"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"ava": "^5.
|
|
39
|
-
"c8": "^
|
|
40
|
-
"documentation": "^14.0.
|
|
41
|
-
"semantic-release": "^
|
|
37
|
+
"ava": "^5.3.1",
|
|
38
|
+
"c8": "^8.0.1",
|
|
39
|
+
"documentation": "^14.0.2",
|
|
40
|
+
"semantic-release": "^22.0.7"
|
|
42
41
|
},
|
|
43
42
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
43
|
+
"node": ">=20.9.0"
|
|
45
44
|
},
|
|
46
45
|
"repository": {
|
|
47
46
|
"type": "git",
|
package/src/endpoint.mjs
CHANGED
|
@@ -9,13 +9,13 @@ import { Interceptor } from "@kronos-integration/interceptor";
|
|
|
9
9
|
* @param {Interceptor|Object[]} [options.interceptors] interceptors
|
|
10
10
|
*/
|
|
11
11
|
export class Endpoint {
|
|
12
|
-
constructor(name, owner, options
|
|
12
|
+
constructor(name, owner, options) {
|
|
13
13
|
const properties = {
|
|
14
14
|
name: { value: name },
|
|
15
15
|
owner: { value: owner }
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
if (options
|
|
18
|
+
if (options?.didConnect !== undefined) {
|
|
19
19
|
properties.didConnect = {
|
|
20
20
|
value: options.didConnect
|
|
21
21
|
};
|
|
@@ -24,7 +24,7 @@ export class Endpoint {
|
|
|
24
24
|
Object.defineProperties(this, properties);
|
|
25
25
|
|
|
26
26
|
this.interceptors = instanciateInterceptors(
|
|
27
|
-
options
|
|
27
|
+
options?.interceptors,
|
|
28
28
|
this.owner
|
|
29
29
|
);
|
|
30
30
|
}
|
|
@@ -9,10 +9,10 @@ export class MultiConnectionEndpoint extends ReceivableEndpoint {
|
|
|
9
9
|
|
|
10
10
|
#connections = new Map();
|
|
11
11
|
|
|
12
|
-
constructor(name, owner, options
|
|
12
|
+
constructor(name, owner, options) {
|
|
13
13
|
super(name, owner, options);
|
|
14
14
|
|
|
15
|
-
if (isEndpoint(options
|
|
15
|
+
if (isEndpoint(options?.connected)) {
|
|
16
16
|
this.addConnection(options.connected);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -13,11 +13,11 @@ export class ReceivableEndpoint extends Endpoint {
|
|
|
13
13
|
|
|
14
14
|
constructor(name, owner, options) {
|
|
15
15
|
super(name, owner, options);
|
|
16
|
-
if (options
|
|
16
|
+
if (options?.receive) {
|
|
17
17
|
this.receive = options.receive;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
if (options
|
|
20
|
+
if (options?.receivingInterceptors) {
|
|
21
21
|
Object.defineProperties(this, {
|
|
22
22
|
receivingInterceptors: {
|
|
23
23
|
value: instanciateInterceptors(
|
package/src/send-endpoint.mjs
CHANGED
|
@@ -16,9 +16,9 @@ export class SendEndpoint extends ReceivableEndpoint {
|
|
|
16
16
|
#connection;
|
|
17
17
|
#state;
|
|
18
18
|
|
|
19
|
-
constructor(name, owner, options
|
|
19
|
+
constructor(name, owner, options) {
|
|
20
20
|
super(name, owner, options);
|
|
21
|
-
if (isEndpoint(options
|
|
21
|
+
if (isEndpoint(options?.connected)) {
|
|
22
22
|
this.addConnection(options.connected);
|
|
23
23
|
}
|
|
24
24
|
}
|