@kronos-integration/endpoint 9.4.46 → 9.4.47
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 +8 -2
- package/package.json +9 -6
- package/src/endpoint.mjs +7 -4
- package/src/multi-connection-endpoint.mjs +4 -4
- package/src/multi-send-endpoint.mjs +1 -0
- package/src/receive-endpoint-self-connected-default.mjs +6 -0
- package/src/receive-endpoint.mjs +1 -0
- package/src/send-endpoint.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@kronos-integration/endpoint)
|
|
2
2
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
3
|
+
[](https://typescriptlang.org)
|
|
3
4
|
[](https://bundlejs.com/?q=@kronos-integration/endpoint)
|
|
4
5
|
[](https://npmjs.org/package/@kronos-integration/endpoint)
|
|
5
6
|
[](https://github.com/Kronos-Integration/endpoint/issues)
|
|
@@ -68,6 +69,7 @@ Named communication (end)-points inside of kronos
|
|
|
68
69
|
* [isConnected](#isconnected-1)
|
|
69
70
|
* [Parameters](#parameters-13)
|
|
70
71
|
* [connections](#connections)
|
|
72
|
+
* [connections](#connections-1)
|
|
71
73
|
* [MultiSendEndpoint](#multisendendpoint)
|
|
72
74
|
* [Parameters](#parameters-14)
|
|
73
75
|
* [isOut](#isout-1)
|
|
@@ -295,7 +297,7 @@ Deliver connection state.
|
|
|
295
297
|
|
|
296
298
|
#### Parameters
|
|
297
299
|
|
|
298
|
-
* `other` **
|
|
300
|
+
* `other` **[Endpoint](#endpoint)** 
|
|
299
301
|
|
|
300
302
|
Returns **any** our state for the connection to other
|
|
301
303
|
|
|
@@ -305,7 +307,7 @@ Set connection state.
|
|
|
305
307
|
|
|
306
308
|
#### Parameters
|
|
307
309
|
|
|
308
|
-
* `other` **
|
|
310
|
+
* `other` **[Endpoint](#endpoint)** 
|
|
309
311
|
* `state` **any** for the connection to other
|
|
310
312
|
|
|
311
313
|
### isConnected
|
|
@@ -322,6 +324,10 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
322
324
|
|
|
323
325
|
All connections
|
|
324
326
|
|
|
327
|
+
## connections
|
|
328
|
+
|
|
329
|
+
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[Endpoint](#endpoint), any>
|
|
330
|
+
|
|
325
331
|
## MultiSendEndpoint
|
|
326
332
|
|
|
327
333
|
**Extends MultiConnectionEndpoint**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/endpoint",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.47",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -28,17 +28,19 @@
|
|
|
28
28
|
"test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
29
29
|
"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
30
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
31
|
-
"lint": "npm run lint:docs",
|
|
32
|
-
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
31
|
+
"lint": "npm run lint:docs && npm run lint:tsc",
|
|
32
|
+
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
33
|
+
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@kronos-integration/interceptor": "^10.2.
|
|
36
|
+
"@kronos-integration/interceptor": "^10.2.38"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"ava": "^6.1.1",
|
|
39
40
|
"c8": "^9.1.0",
|
|
40
41
|
"documentation": "^14.0.3",
|
|
41
|
-
"semantic-release": "^23.0.2"
|
|
42
|
+
"semantic-release": "^23.0.2",
|
|
43
|
+
"typescript": "^5.3.3"
|
|
42
44
|
},
|
|
43
45
|
"engines": {
|
|
44
46
|
"node": ">=20.11.0"
|
|
@@ -54,7 +56,8 @@
|
|
|
54
56
|
"template": {
|
|
55
57
|
"inheritFrom": [
|
|
56
58
|
"arlac77/template-arlac77-github",
|
|
57
|
-
"arlac77/template-kronos-component"
|
|
59
|
+
"arlac77/template-kronos-component",
|
|
60
|
+
"arlac77/template-typescript"
|
|
58
61
|
]
|
|
59
62
|
}
|
|
60
63
|
}
|
package/src/endpoint.mjs
CHANGED
|
@@ -129,7 +129,7 @@ export class Endpoint {
|
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Deliver data flow direction.
|
|
132
|
-
* @return {string} delivers data flow direction 'in', 'out', 'inout' or undefined
|
|
132
|
+
* @return {string|undefined} delivers data flow direction 'in', 'out', 'inout' or undefined
|
|
133
133
|
*/
|
|
134
134
|
get direction() {
|
|
135
135
|
if (this.isIn) {
|
|
@@ -251,7 +251,7 @@ export class Endpoint {
|
|
|
251
251
|
/**
|
|
252
252
|
* Actually start with the communication.
|
|
253
253
|
* @param {Endpoint} other
|
|
254
|
-
* @param {boolean} backpointer true if this is the call
|
|
254
|
+
* @param {boolean?} backpointer true if this is the call from back call from the other side
|
|
255
255
|
*/
|
|
256
256
|
openConnection(other, backpointer) {
|
|
257
257
|
if (other !== undefined) {
|
|
@@ -276,7 +276,7 @@ export class Endpoint {
|
|
|
276
276
|
/**
|
|
277
277
|
* Actually stop the communication.
|
|
278
278
|
* @param {Endpoint} other
|
|
279
|
-
* @param {boolean} backpointer true if this is the call
|
|
279
|
+
* @param {boolean?} backpointer true if this is the call from back call from the other side
|
|
280
280
|
*/
|
|
281
281
|
closeConnection(other, backpointer) {
|
|
282
282
|
if (other !== undefined) {
|
|
@@ -310,6 +310,9 @@ export class Endpoint {
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
/**
|
|
314
|
+
* @return {Iterable<any>}
|
|
315
|
+
*/
|
|
313
316
|
*connections() {}
|
|
314
317
|
|
|
315
318
|
addConnection() {}
|
|
@@ -330,7 +333,7 @@ export class Endpoint {
|
|
|
330
333
|
*/
|
|
331
334
|
setConnectionState(other, state) {}
|
|
332
335
|
|
|
333
|
-
didConnect() {}
|
|
336
|
+
didConnect(a,b) {}
|
|
334
337
|
|
|
335
338
|
get receivingInterceptors() {
|
|
336
339
|
return [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isEndpoint } from "./endpoint.mjs";
|
|
1
|
+
import { isEndpoint, Endpoint } from "./endpoint.mjs";
|
|
2
2
|
import { ReceivableEndpoint } from "./receivable-endpoint.mjs";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { ReceivableEndpoint } from "./receivable-endpoint.mjs";
|
|
|
7
7
|
*/
|
|
8
8
|
export class MultiConnectionEndpoint extends ReceivableEndpoint {
|
|
9
9
|
|
|
10
|
-
#connections = new Map();
|
|
10
|
+
/** @type {Map<Endpoint,any>} */ #connections = new Map();
|
|
11
11
|
|
|
12
12
|
constructor(name, owner, options) {
|
|
13
13
|
super(name, owner, options);
|
|
@@ -19,7 +19,7 @@ export class MultiConnectionEndpoint extends ReceivableEndpoint {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Deliver connection state.
|
|
22
|
-
* @param {
|
|
22
|
+
* @param {Endpoint} other
|
|
23
23
|
* @return {any} our state for the connection to other
|
|
24
24
|
*/
|
|
25
25
|
getConnectionState(other) {
|
|
@@ -28,7 +28,7 @@ export class MultiConnectionEndpoint extends ReceivableEndpoint {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Set connection state.
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {Endpoint} other
|
|
32
32
|
* @param {any} state for the connection to other
|
|
33
33
|
*/
|
|
34
34
|
setConnectionState(other, state) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReceiveEndpointDefault } from "./receive-endpoint-default.mjs";
|
|
2
|
+
import { Endpoint } from "./endpoint.mjs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Receiving endpoint wich can also send to itself.
|
|
@@ -20,6 +21,11 @@ export class ReceiveEndpointSelfConnectedDefault extends ReceiveEndpointDefault
|
|
|
20
21
|
return super.addConnection(other, backpointer);
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Actually stop the communication.
|
|
26
|
+
* @param {Endpoint} other
|
|
27
|
+
* @param {boolean?} backpointer true if this is the call form back call from the other side
|
|
28
|
+
*/
|
|
23
29
|
removeConnection(other, backpointer) {
|
|
24
30
|
if (other === this) {
|
|
25
31
|
return;
|
package/src/receive-endpoint.mjs
CHANGED
package/src/send-endpoint.mjs
CHANGED