@kronos-integration/interceptor 10.3.8 → 11.0.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/interceptor",
3
- "version": "10.3.8",
3
+ "version": "11.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -39,7 +39,7 @@
39
39
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
40
40
  },
41
41
  "dependencies": {
42
- "model-attributes": "^4.3.0"
42
+ "pacc": "^3.6.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@kronos-integration/test-interceptor": "^7.0.29",
@@ -1,4 +1,4 @@
1
- import { setAttributes, getAttributes } from "model-attributes";
1
+ import { setAttributes, getAttributes } from "pacc";
2
2
 
3
3
  /**
4
4
  * @typedef {Object} Endpoint
@@ -50,7 +50,7 @@ export class Interceptor {
50
50
  * @param {Object?} config
51
51
  */
52
52
  configure(config) {
53
- setAttributes(this, this.configurationAttributes, config);
53
+ setAttributes(this, config, this.configurationAttributes);
54
54
  }
55
55
 
56
56
  toString() {
@@ -1,4 +1,4 @@
1
- import { mergeAttributes, createAttributes } from "model-attributes";
1
+ import { mergeAttributeDefinitions, prepareAttributesDefinitions } from "pacc";
2
2
  import { Interceptor } from "./interceptor.mjs";
3
3
 
4
4
  /**
@@ -25,8 +25,8 @@ export class LimitingInterceptor extends Interceptor {
25
25
  }
26
26
 
27
27
  static get configurationAttributes() {
28
- return mergeAttributes(
29
- createAttributes({
28
+ return mergeAttributeDefinitions(
29
+ prepareAttributesDefinitions({
30
30
  limits: {
31
31
  default: [
32
32
  {
@@ -1,5 +1,8 @@
1
1
  import { Interceptor } from "./interceptor.mjs";
2
- import { mergeAttributes, createAttributes } from "model-attributes";
2
+ import {
3
+ mergeAttributeDefinitions,
4
+ prepareAttributesDefinitions
5
+ } from "pacc";
3
6
  import { expand } from "./util.mjs";
4
7
 
5
8
  /**
@@ -14,18 +17,13 @@ export class TemplateInterceptor extends Interceptor {
14
17
  }
15
18
 
16
19
  static get configurationAttributes() {
17
- return mergeAttributes(
18
- createAttributes({
20
+ return mergeAttributeDefinitions(
21
+ prepareAttributesDefinitions({
19
22
  request: {
20
23
  description: "request template",
21
24
  default: {},
22
25
  type: "object"
23
- }/*,
24
- response: {
25
- description: "response template",
26
- default: {},
27
- type: "object"
28
- }*/
26
+ }
29
27
  }),
30
28
  Interceptor.configurationAttributes
31
29
  );
@@ -1,4 +1,7 @@
1
- import { mergeAttributes, createAttributes } from "model-attributes";
1
+ import {
2
+ mergeAttributeDefinitions,
3
+ prepareAttributesDefinitions
4
+ } from "pacc";
2
5
  import { Interceptor } from "./interceptor.mjs";
3
6
 
4
7
  /**
@@ -7,8 +10,8 @@ import { Interceptor } from "./interceptor.mjs";
7
10
  */
8
11
  export class TimeoutInterceptor extends Interceptor {
9
12
  static get configurationAttributes() {
10
- return mergeAttributes(
11
- createAttributes({
13
+ return mergeAttributeDefinitions(
14
+ prepareAttributesDefinitions({
12
15
  timeout: {
13
16
  description: "request timeout",
14
17
  default: 1,