@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 CHANGED
@@ -1,8 +1,5 @@
1
- [![npm](https://img.shields.io/npm/v/@kronos-integration/interceptor.svg)](https://www.npmjs.com/package/@kronos-integration/interceptor)
2
1
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
3
2
  [![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\&label\&labelColor=blue\&color=555555)](https://typescriptlang.org)
4
- [![bundlejs](https://deno.bundlejs.com/?q=@kronos-integration/interceptor\&badge=detailed)](https://bundlejs.com/?q=@kronos-integration/interceptor)
5
- [![downloads](http://img.shields.io/npm/dm/@kronos-integration/interceptor.svg?style=flat-square)](https://npmjs.org/package/@kronos-integration/interceptor)
6
3
  [![GitHub Issues](https://img.shields.io/github/issues/Kronos-Integration/interceptor.svg?style=flat-square)](https://github.com/Kronos-Integration/interceptor/issues)
7
4
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FKronos-Integration%2Finterceptor%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/Kronos-Integration/interceptor/goto)
8
5
  [![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](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.0",
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
- "types": "./types/index.d.mts",
11
- "default": "./src/index.mjs"
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": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
32
- "test": "npm run test:ava",
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": "npm run lint:docs && npm run lint:tsc",
37
+ "lint": "node --run lint:docs && node --run lint:typescript",
37
38
  "lint:docs": "documentation lint ./src/**/*.mjs",
38
- "lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
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.1",
46
- "c8": "^9.1.0",
46
+ "ava": "^6.1.3",
47
+ "c8": "^10.1.2",
47
48
  "documentation": "^14.0.3",
48
- "semantic-release": "^23.0.2",
49
- "typescript": "^5.3.3"
49
+ "semantic-release": "^24.1.2",
50
+ "typescript": "^5.7.0-beta"
50
51
  },
51
52
  "engines": {
52
- "node": ">=20.11.0"
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";