@zayne-labs/callapi 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -541,7 +541,7 @@ const callAnotherApi = callApi.create({
541
541
  - `retryDelay`: Delay between retries in milliseconds. (default: 500)
542
542
  - `retryCodes`: HTTP status codes that trigger a retry. (default: [409, 425, 429, 500, 502, 503, 504])
543
543
  - `retryMethods`: HTTP methods that are allowed to retry. (default: ["GET", "POST"])
544
- - `meta`: An optional field for additional information, typically used for logging or tracing.
544
+ - `meta`: An optional field that can contain additional information about a request, which could be helpful in differentiating between different requests in a shared interceptor.
545
545
  - `onRequest`: Interceptor called just before the request is made, allowing for modifications or additional operations.
546
546
  - `onRequestError`: Interceptor called when an error occurs during the fetch request.
547
547
  - `onResponse`: Interceptor called when a successful response is received from the API.
package/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@zayne-labs/callapi",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "description": "A lightweight wrapper over fetch with quality of life improvements like built-in request cancellation, retries, interceptors and more",
6
6
  "main": "./dist/src/index.js",
7
- "types": "./dist/src/index.d.ts",
7
+ "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./dist/src/index.js",
11
- "require": "./dist/src/index.cjs"
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/src/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/src/index.cjs"
17
+ }
12
18
  }
13
19
  },
14
20
  "publishConfig": {