@kronos-integration/interceptor 10.3.0 → 10.3.1
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 +6 -4
- package/package.json +14 -13
- package/types/timeout-interceptor.d.mts +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/@kronos-integration/interceptor)
|
|
2
1
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
3
2
|
[](https://typescriptlang.org)
|
|
4
|
-
[](https://bundlejs.com/?q=@kronos-integration/interceptor)
|
|
5
|
-
[](https://npmjs.org/package/@kronos-integration/interceptor)
|
|
6
3
|
[](https://github.com/Kronos-Integration/interceptor/issues)
|
|
7
4
|
[](https://actions-badge.atrox.dev/Kronos-Integration/interceptor/goto)
|
|
8
5
|
[](https://github.com/prettier/prettier)
|
|
@@ -31,6 +28,7 @@ const response = interceptor.receive(endpoint, arg1, arg2);
|
|
|
31
28
|
|
|
32
29
|
### Table of Contents
|
|
33
30
|
|
|
31
|
+
* [Endpoint](#endpoint)
|
|
34
32
|
* [Interceptor](#interceptor)
|
|
35
33
|
* [Parameters](#parameters)
|
|
36
34
|
* [type](#type)
|
|
@@ -62,6 +60,10 @@ const response = interceptor.receive(endpoint, arg1, arg2);
|
|
|
62
60
|
* [expand](#expand)
|
|
63
61
|
* [Parameters](#parameters-7)
|
|
64
62
|
|
|
63
|
+
## Endpoint
|
|
64
|
+
|
|
65
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
66
|
+
|
|
65
67
|
## Interceptor
|
|
66
68
|
|
|
67
69
|
Base interceptor. The base class for all the interceptors
|
|
@@ -118,7 +120,7 @@ and calls the trailing interceptor.
|
|
|
118
120
|
|
|
119
121
|
#### Parameters
|
|
120
122
|
|
|
121
|
-
* `endpoint` **Endpoint** 
|
|
123
|
+
* `endpoint` **[Endpoint](#endpoint)** 
|
|
122
124
|
* `next` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
|
|
123
125
|
* `args` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>** the request from the leading interceptor
|
|
124
126
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/interceptor",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
7
7
|
},
|
|
8
|
+
"types": "./types/index.d.mts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
11
|
+
"default": "./src/index.mjs",
|
|
12
|
+
"types": "./types/index.d.mts"
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
|
-
"types": "./types/index.d.mts",
|
|
15
15
|
"description": "intercepects / modifies requests as they pass between endpoints",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"interceptor"
|
|
@@ -28,28 +28,29 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "BSD-2-Clause",
|
|
30
30
|
"scripts": {
|
|
31
|
-
"prepare": "
|
|
32
|
-
"
|
|
31
|
+
"prepare": "node --run prepare:typescript",
|
|
32
|
+
"prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
|
|
33
|
+
"test": "node --run test:ava",
|
|
33
34
|
"test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
34
35
|
"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",
|
|
35
36
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
36
|
-
"lint": "
|
|
37
|
+
"lint": "node --run lint:docs && node --run lint:typescript",
|
|
37
38
|
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
38
|
-
"lint:
|
|
39
|
+
"lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"model-attributes": "^4.2.2"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@kronos-integration/test-interceptor": "^7.0.27",
|
|
45
|
-
"ava": "^6.1.
|
|
46
|
-
"c8": "^
|
|
46
|
+
"ava": "^6.1.3",
|
|
47
|
+
"c8": "^10.1.2",
|
|
47
48
|
"documentation": "^14.0.3",
|
|
48
|
-
"semantic-release": "^
|
|
49
|
-
"typescript": "^5.
|
|
49
|
+
"semantic-release": "^24.1.2",
|
|
50
|
+
"typescript": "^5.7.0-beta"
|
|
50
51
|
},
|
|
51
52
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
53
|
+
"node": ">=22.11.0"
|
|
53
54
|
},
|
|
54
55
|
"repository": {
|
|
55
56
|
"type": "git",
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* @property {number} timeout
|
|
4
4
|
*/
|
|
5
5
|
export class TimeoutInterceptor extends Interceptor {
|
|
6
|
-
receive(endpoint: any, next: any, ...args: any[]): any
|
|
6
|
+
receive(endpoint: any, next: any, ...args: any[]): Promise<any>;
|
|
7
7
|
}
|
|
8
8
|
import { Interceptor } from "./interceptor.mjs";
|