@kronos-integration/interceptor 13.5.1 → 13.5.2

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 CHANGED
@@ -46,7 +46,7 @@ const response = interceptor.receive(endpoint, arg1, arg2);
46
46
  * [Properties](#properties)
47
47
  * [name](#name)
48
48
  * [LimitingInterceptor](#limitinginterceptor)
49
- * [reset](#reset-1)
49
+ * [toJSONWithOptions](#tojsonwithoptions-1)
50
50
  * [Parameters](#parameters-4)
51
51
  * [name](#name-1)
52
52
  * [LoggingInterceptor](#logginginterceptor)
@@ -169,10 +169,11 @@ Sample config:
169
169
  20 : reject
170
170
  default is to reject when more than 10 requests are on the way
171
171
 
172
- ### reset
172
+ ### toJSONWithOptions
173
173
 
174
174
  #### Parameters
175
175
 
176
+ * `options`  
176
177
  * `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
177
178
 
178
179
  ### name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/interceptor",
3
- "version": "13.5.1",
3
+ "version": "13.5.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -35,7 +35,7 @@
35
35
  "lint:docs": "documentation lint ./src**/*.mjs"
36
36
  },
37
37
  "dependencies": {
38
- "pacc": "^14.1.0"
38
+ "pacc": "^14.2.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@kronos-integration/test-interceptor": "^7.2.6",
@@ -45,7 +45,7 @@
45
45
  "semantic-release": "^25.0.9"
46
46
  },
47
47
  "engines": {
48
- "node": ">=26.3.0"
48
+ "node": ">=26.10.0"
49
49
  },
50
50
  "repository": {
51
51
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  addType,
3
- setAttributes,
3
+ assign,
4
4
  extract,
5
5
  type_attribute,
6
6
  SCOPE_RUNTIME
@@ -46,14 +46,6 @@ export class Interceptor {
46
46
  return this.constructor.name;
47
47
  }
48
48
 
49
- /**
50
- * Meta description of the configuration.
51
- * @return {Object}
52
- */
53
- get attributes() {
54
- return this.constructor.attributes;
55
- }
56
-
57
49
  /**
58
50
  * Takes attribute values from config parameters
59
51
  * and copies them over to the object.
@@ -64,7 +56,7 @@ export class Interceptor {
64
56
  * @param {Object} [config]
65
57
  */
66
58
  configure(config) {
67
- setAttributes(this, config, this.attributes);
59
+ assign(this, config);
68
60
  }
69
61
 
70
62
  toString() {
@@ -50,24 +50,6 @@ export class LimitingInterceptor extends Interceptor {
50
50
  addType(this);
51
51
  }
52
52
 
53
- /**
54
- *
55
- * @param {Object?} config
56
- */
57
- /*constructor(config) {
58
- super(config);
59
- this.limits = config?.limits || this.attributes.limits.default;
60
- }*/
61
-
62
- toJSONWithOptions(options) {
63
- const json = super.toJSONWithOptions(options);
64
-
65
- console.log("LIMITS",this.limits);
66
-
67
- json.limits = this.limits;
68
- return json;
69
- }
70
-
71
53
  reset() {
72
54
  this.ongoingResponses = new Set();
73
55
  this.ongoingRequests = 0;