@kronos-integration/interceptor 13.1.31 → 13.2.0

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@kronos-integration/interceptor",
3
- "version": "13.1.31",
3
+ "version": "13.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
7
7
  },
8
- "packageManager": "npm@11.10.0",
8
+ "packageManager": "npm@11.13.0",
9
9
  "types": "./types/index.d.mts",
10
10
  "exports": {
11
11
  ".": {
@@ -40,18 +40,23 @@
40
40
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "pacc": "^9.2.5"
43
+ "pacc": "^9.2.8"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@kronos-integration/test-interceptor": "^7.0.32",
47
- "ava": "^7.0.0",
47
+ "ava": "^8.0.1",
48
48
  "c8": "^11.0.0",
49
49
  "documentation": "^14.0.3",
50
50
  "semantic-release": "^25.0.3",
51
- "typescript": "^5.9.3"
51
+ "typescript": "^6.0.3"
52
+ },
53
+ "overrides": {
54
+ "c8": {
55
+ "yargs": "^18.0.0"
56
+ }
52
57
  },
53
58
  "engines": {
54
- "node": ">=24.13.1"
59
+ "node": ">=26.1.0"
55
60
  },
56
61
  "repository": {
57
62
  "type": "git",
@@ -16,7 +16,7 @@ export class Interceptor {
16
16
  *
17
17
  * @param {Object} [config]
18
18
  */
19
- constructor(config?: any);
19
+ constructor(config?: Object);
20
20
  /**
21
21
  * The instance method returning the type.
22
22
  * Defaults to the constructors name (class name)
@@ -27,7 +27,7 @@ export class Interceptor {
27
27
  * Meta description of the configuration.
28
28
  * @return {Object}
29
29
  */
30
- get attributes(): any;
30
+ get attributes(): Object;
31
31
  /**
32
32
  * Takes attribute values from config parameters
33
33
  * and copies them over to the object.
@@ -37,14 +37,14 @@ export class Interceptor {
37
37
  * a setter function or simply assign the attribute value.
38
38
  * @param {Object} [config]
39
39
  */
40
- configure(config?: any): void;
40
+ configure(config?: Object): void;
41
41
  toString(): string;
42
- toJSON(): any;
42
+ toJSON(): Object;
43
43
  /**
44
44
  * Deliver the json representation.
45
45
  * @return {Object} json representation
46
46
  */
47
- toJSONWithOptions(options: any): any;
47
+ toJSONWithOptions(options: any): Object;
48
48
  /**
49
49
  * Forget all accumulated information.
50
50
  */
@@ -59,4 +59,4 @@ export class Interceptor {
59
59
  */
60
60
  receive(endpoint: Endpoint, next: Function, ...args: any[]): Promise<any>;
61
61
  }
62
- export type Endpoint = any;
62
+ export type Endpoint = Object;
@@ -3,8 +3,8 @@
3
3
  * @property {number} interval
4
4
  */
5
5
  export class IntervalInterceptor extends Interceptor {
6
- static attributes: any;
6
+ static attributes: Object;
7
7
  receive(endpoint: any, next: any, ...args: any[]): Promise<any>;
8
- lastTime: Date;
8
+ lastTime: Date | undefined;
9
9
  }
10
10
  import { Interceptor } from "./interceptor.mjs";
@@ -14,15 +14,15 @@
14
14
  * default is to reject when more than 10 requests are on the way
15
15
  */
16
16
  export class LimitingInterceptor extends Interceptor {
17
- static attributes: any;
17
+ static attributes: Object;
18
18
  /**
19
19
  *
20
20
  * @param {Object?} config
21
21
  */
22
- constructor(config: any | null);
22
+ constructor(config: Object | null);
23
23
  limits: any;
24
- ongoingResponses: Set<any>;
25
- ongoingRequests: number;
24
+ ongoingResponses: Set<any> | undefined;
25
+ ongoingRequests: number | undefined;
26
26
  receive(endpoint: any, next: any, ...args: any[]): Promise<any>;
27
27
  _processRequest(next: any, ...args: any[]): any;
28
28
  }
@@ -3,11 +3,11 @@
3
3
  * processed and failed requests.
4
4
  */
5
5
  export class StatsCollectorInterceptor extends Interceptor {
6
- numberOfRequests: number;
7
- numberOfFailedRequests: number;
8
- minRequestProcessingTime: number;
9
- maxRequestProcessingTime: number;
10
- totalRequestProcessingTime: number;
6
+ numberOfRequests: number | undefined;
7
+ numberOfFailedRequests: number | undefined;
8
+ minRequestProcessingTime: number | undefined;
9
+ maxRequestProcessingTime: number | undefined;
10
+ totalRequestProcessingTime: number | undefined;
11
11
  /**
12
12
  * Logs the time the requests takes
13
13
  */
@@ -2,7 +2,7 @@
2
2
  * Map params into requests.
3
3
  */
4
4
  export class TemplateInterceptor extends Interceptor {
5
- static attributes: any;
5
+ static attributes: Object;
6
6
  receive(endpoint: any, next: any, params: any): Promise<any>;
7
7
  }
8
8
  import { Interceptor } from "./interceptor.mjs";
@@ -3,7 +3,7 @@
3
3
  * @property {number} timeout
4
4
  */
5
5
  export class TimeoutInterceptor extends Interceptor {
6
- static attributes: any;
6
+ static attributes: Object;
7
7
  receive(endpoint: any, next: any, ...args: any[]): Promise<any>;
8
8
  }
9
9
  import { Interceptor } from "./interceptor.mjs";