vigor-fetch 1.0.3 → 1.0.5

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 (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +9 -5
  3. package/package.json +15 -4
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) [2024] [Uav1010 / Your Full Name]
3
+ Copyright (c) [2024] [Uav1010]
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -12,12 +12,15 @@
12
12
  - 🎯 **Immutable Chaining**: Every configuration method returns a new instance, making it perfect for base templates and functional patterns.
13
13
 
14
14
  ## 📦 Installation
15
+ ```powershell
15
16
 
16
17
  npm install vigor-fetch
17
18
 
19
+ ```
20
+
18
21
  ## 🛠️ API References
19
22
 
20
- 1. Vigor().fetch(origin, config)
23
+ 1. **Vigor().fetch(origin, config)**
21
24
 
22
25
  | Method | Type | Default | Description
23
26
  | :--- | :--- | :--- | :--- |
@@ -42,7 +45,8 @@ npm install vigor-fetch
42
45
  | .onError(...hooks) | Function[] | [] | Hooks to handle errors; can recover from error by returning a value. |
43
46
  | .request() | Promise<T> | - | Executes the request logic including retries and hooks. |
44
47
 
45
- 2. Vigor().all(config)
48
+ 2. **Vigor().all(config)**
49
+
46
50
  | Method | Type | Default | Description
47
51
  | :--- | :--- | :--- | :--- |
48
52
  | .limit(arg) | number | 10 | Maximum number of concurrent promises running at once. |
@@ -72,7 +76,7 @@ const data = await vigor.fetch("https://api.example.com")
72
76
 
73
77
  ## 🛠️ Advanced Patterns
74
78
 
75
- 1. Request Templates
79
+ 1. **Request Templates**
76
80
 
77
81
  ```javascript
78
82
 
@@ -90,7 +94,7 @@ const settings = await apiClient.path("/settings").request();
90
94
 
91
95
  ```
92
96
 
93
- 2. Batch Processing with Concurrency Limit
97
+ 2. **Batch Processing with Concurrency Limit**
94
98
 
95
99
  ```javascript
96
100
 
@@ -110,7 +114,7 @@ const results = await vigor.all()
110
114
 
111
115
  ```
112
116
 
113
- 3. Middleware & Hooks
117
+ 3. **Middleware & Hooks**
114
118
 
115
119
  ```javascript
116
120
 
package/package.json CHANGED
@@ -1,10 +1,21 @@
1
1
  {
2
2
  "name": "vigor-fetch",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Smart, zero-dependency HTTP client with self-healing retries for rate-limited servers.",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "require": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "import": {
14
+ "types": "./dist/index.d.mts",
15
+ "default": "./dist/index.mjs"
16
+ }
17
+ }
18
+ },
8
19
  "files": [
9
20
  "dist"
10
21
  ],