@kronos-integration/endpoint 9.4.41 → 9.4.43
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 +10 -11
- package/src/receivable-endpoint.mjs +7 -6
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.43",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"sideEffects": false,
|
|
8
7
|
"exports": {
|
|
9
8
|
".": "./src/module.mjs"
|
|
10
9
|
},
|
|
@@ -25,27 +24,27 @@
|
|
|
25
24
|
"license": "BSD-2-Clause",
|
|
26
25
|
"scripts": {
|
|
27
26
|
"test": "npm run test:ava",
|
|
28
|
-
"test:ava": "ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
29
|
-
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout
|
|
27
|
+
"test:ava": "ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && 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.1
|
|
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.6"
|
|
42
41
|
},
|
|
43
42
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
43
|
+
"node": ">=20.9.0"
|
|
45
44
|
},
|
|
46
45
|
"repository": {
|
|
47
46
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/Kronos-Integration/endpoint
|
|
47
|
+
"url": "https://github.com/Kronos-Integration/endpoint"
|
|
49
48
|
},
|
|
50
49
|
"bugs": {
|
|
51
50
|
"url": "https://github.com/Kronos-Integration/endpoint/issues"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Endpoint, instanciateInterceptors } from "./endpoint.mjs";
|
|
2
2
|
|
|
3
|
-
const RECEIVE = Symbol("receive");
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* @param {string} name endpoint name
|
|
7
5
|
* @param {Object} owner of the endpoint (service)
|
|
@@ -10,6 +8,9 @@ const RECEIVE = Symbol("receive");
|
|
|
10
8
|
* @param {Function} [options.receivingInterceptors]
|
|
11
9
|
*/
|
|
12
10
|
export class ReceivableEndpoint extends Endpoint {
|
|
11
|
+
|
|
12
|
+
#receive;
|
|
13
|
+
|
|
13
14
|
constructor(name, owner, options) {
|
|
14
15
|
super(name, owner, options);
|
|
15
16
|
if (options.receive) {
|
|
@@ -32,7 +33,7 @@ export class ReceivableEndpoint extends Endpoint {
|
|
|
32
33
|
* @return {boolean} true is receive function is present
|
|
33
34
|
*/
|
|
34
35
|
get isIn() {
|
|
35
|
-
return this
|
|
36
|
+
return this.#receive !== undefined;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -40,7 +41,7 @@ export class ReceivableEndpoint extends Endpoint {
|
|
|
40
41
|
* @return {Function}
|
|
41
42
|
*/
|
|
42
43
|
get receive() {
|
|
43
|
-
return this
|
|
44
|
+
return this.#receive;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -48,10 +49,10 @@ export class ReceivableEndpoint extends Endpoint {
|
|
|
48
49
|
* @param {Function} receive
|
|
49
50
|
*/
|
|
50
51
|
set receive(receive) {
|
|
51
|
-
this
|
|
52
|
+
this.#receive = receive;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
get isOpen() {
|
|
55
|
-
return this
|
|
56
|
+
return this.#receive !== undefined;
|
|
56
57
|
}
|
|
57
58
|
}
|