reqwise-core 1.1.1 → 1.1.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.
- package/README.md +447 -36
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,71 +1,482 @@
|
|
|
1
|
-
# @reqwise
|
|
1
|
+
# @reqwise-core 🚀
|
|
2
2
|
|
|
3
|
-
> **Reqwise
|
|
3
|
+
> **Reqwise** is a powerful, production-ready developer tool npm package that captures, logs, and visualizes HTTP API requests (Axios/Fetch) within React and vanilla JavaScript applications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It operates like a mini **Postman** or **Chrome DevTools Network** panel embedded directly inside your application. Through a floating aside panel, developers can inspect requests in real-time, browse page history, analyze API endpoints, and send manual test requests with a single click.
|
|
6
|
+
|
|
7
|
+
**Version:** 1.1.3 | **Status:** Production Ready
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
|
-
## ✨
|
|
11
|
+
## ✨ Core Features
|
|
12
|
+
|
|
13
|
+
### 🔄 HTTP Interception & Logging
|
|
14
|
+
- **Full HTTP Capture:** Automatically logs all request/response payloads (method, URL, headers, body, status, duration)
|
|
15
|
+
- **Axios & Fetch Support:** Works seamlessly with Axios interceptors or native fetch API
|
|
16
|
+
- **Request Timing:** Precise measurement of round-trip duration for performance analysis
|
|
17
|
+
- **Error Tracking:** Captures network errors, timeouts, and HTTP error responses with stack traces
|
|
18
|
+
|
|
19
|
+
### 💾 Smart Persistence
|
|
20
|
+
- **localStorage Integration:** Stores all request history under `reqwise_history_v1` key
|
|
21
|
+
- **In-Memory Mode:** Optional in-memory storage without localStorage pollution (for restricted environments)
|
|
22
|
+
- **Auto-Cleanup:** Configurable `maxItems` limit with oldest-first eviction strategy
|
|
23
|
+
- **TTL Support:** Automatic deletion of entries older than configurable `historyTTL` (in days)
|
|
24
|
+
|
|
25
|
+
### 🛡️ Security & Privacy
|
|
26
|
+
- **Header Masking:** Redact sensitive headers like `Authorization`, `Cookie`, `X-API-Key` (configurable)
|
|
27
|
+
- **Field Masking:** Obfuscate nested JSON fields like `password`, `token`, `ssn`, `cvv` with recursive traversal
|
|
28
|
+
- **Smart Ignore Patterns:** Skip unwanted URLs (health checks, analytics, static assets) with regex/substring matching
|
|
29
|
+
- **No Data Transmission:** All data stays local; no external calls made by Reqwise
|
|
30
|
+
|
|
31
|
+
### 🌍 Internationalization (i18n)
|
|
32
|
+
- **15 Languages Built-in:** English, Turkish, Azerbaijani, Russian, German, French, Spanish, Portuguese, Chinese, Japanese, Arabic, Korean, Italian, Polish, Dutch
|
|
33
|
+
- **Smart Language Detection:** Auto-detects user's browser language with fallback to English
|
|
34
|
+
- **Runtime Switching:** UI language selector in the panel (visible when 2+ languages enabled)
|
|
35
|
+
- **Persistent Selection:** Selected language saved to localStorage
|
|
36
|
+
|
|
37
|
+
### ⌨️ Keyboard & Hotkey Support
|
|
38
|
+
- **Customizable Hotkeys:** Toggle panel with keyboard shortcut (default: `ctrl+shift+e`)
|
|
39
|
+
- **Cross-platform:** Works on Windows, Mac, Linux
|
|
40
|
+
- **Smart Modifier Parsing:** Supports `ctrl`, `shift`, `alt`, `meta` combinations
|
|
41
|
+
|
|
42
|
+
### 🎨 UI & UX Enhancements
|
|
43
|
+
- **4 Tabbed Interface:**
|
|
44
|
+
- **Current Tab:** Requests from current page
|
|
45
|
+
- **History Tab:** All captured requests with filtering (method, status, page, source)
|
|
46
|
+
- **Send Tab:** Mini HTTP client — compose and send test requests
|
|
47
|
+
- **Endpoints Tab:** Auto-discovered API endpoints with statistics (hit count, methods, params, examples)
|
|
48
|
+
- **Placement Flexibility:** 4 positions (top, right, bottom, left) — sidebars or drawers
|
|
49
|
+
- **Theme Support:** Dark, Light, and System (prefers-color-scheme) themes
|
|
50
|
+
- **Responsive Sizing:** 4 size presets (sm: 320px, md: 420px, lg: 560px, full: 100%)
|
|
51
|
+
- **Opacity Control:** Semi-transparent panels with configurable opacity (0.0–1.0) and backdrop blur
|
|
52
|
+
- **Request Cards:** Compact view (method + URL + status + duration) or detailed view with collapsible sections
|
|
10
53
|
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
54
|
+
### 🔍 Filtering & Search
|
|
55
|
+
- **Method Filter:** GET, POST, PUT, PATCH, DELETE
|
|
56
|
+
- **Status Filter:** All, Success (2xx), Client Errors (4xx), Server Errors (5xx)
|
|
57
|
+
- **Page Filter:** View requests by page (useful in SPAs)
|
|
58
|
+
- **Source Filter:** Auto-captured vs. manual (Send tab) requests
|
|
59
|
+
- **URL Search:** Text filter by URL patterns
|
|
60
|
+
|
|
61
|
+
### 📊 Endpoint Intelligence
|
|
62
|
+
- **Auto-Discovery:** Learns all API endpoints from captured requests
|
|
63
|
+
- **Statistics:** Per-endpoint metrics (hit count, HTTP methods used, parameter types)
|
|
64
|
+
- **Type Inference:** Detects query parameter types (string, number, boolean)
|
|
65
|
+
- **Example Collection:** Stores real-world examples of parameter values
|
|
66
|
+
|
|
67
|
+
### 📤 Advanced Features (v1.1)
|
|
68
|
+
- **Callback Hooks:**
|
|
69
|
+
- `onRequest(entry)` — fires when request starts
|
|
70
|
+
- `onResponse(entry)` — fires on successful response
|
|
71
|
+
- `onError(entry)` — fires on HTTP error (4xx/5xx) or network failure
|
|
72
|
+
- **Request Grouping:** Optionally group requests by URL, method, status, or page
|
|
73
|
+
- **Highlight Mode:** Highlight error requests (red) or slow requests (>500ms, yellow)
|
|
16
74
|
|
|
17
75
|
---
|
|
18
76
|
|
|
19
|
-
## 📦
|
|
77
|
+
## 📦 Installation
|
|
20
78
|
|
|
21
|
-
|
|
79
|
+
### npm
|
|
80
|
+
```bash
|
|
81
|
+
npm install @reqwise-core
|
|
82
|
+
```
|
|
22
83
|
|
|
84
|
+
### pnpm
|
|
23
85
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
86
|
+
pnpm add @reqwise-core
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### yarn
|
|
90
|
+
```bash
|
|
91
|
+
yarn add @reqwise-core
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🚀 Architecture Flow
|
|
97
|
+
|
|
98
|
+
Reqwise acts as a transparent interceptor layer:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Application
|
|
102
|
+
↓
|
|
103
|
+
ReqwiseClient.post("/api/users", data)
|
|
104
|
+
↓
|
|
105
|
+
[Capture request metadata]
|
|
106
|
+
↓
|
|
107
|
+
↙ With Axios Or Fetch with fallback ↘
|
|
108
|
+
axios.post(...) fetch(...)
|
|
109
|
+
↓
|
|
110
|
+
Backend API
|
|
111
|
+
↓
|
|
112
|
+
Response received
|
|
113
|
+
↓
|
|
114
|
+
[Record response, status, duration]
|
|
115
|
+
↓
|
|
116
|
+
[Dispatch reqwise:update event]
|
|
117
|
+
↓
|
|
118
|
+
[Panel re-renders with new entry]
|
|
119
|
+
↓
|
|
120
|
+
[Save to localStorage]
|
|
121
|
+
↓
|
|
122
|
+
Application receives response
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Data Lifecycle
|
|
126
|
+
1. **Request Started** → captured metadata (method, URL, headers, body)
|
|
127
|
+
2. **HTTP Executed** → Axios or fetch sends actual request
|
|
128
|
+
3. **Response Received** → status, headers, body captured
|
|
129
|
+
4. **Callbacks Fired** → `onRequest` → storage → `onResponse/onError`
|
|
130
|
+
5. **UI Updated** → panel detects new entry via custom event
|
|
131
|
+
6. **Persistence** → `localStorage.setItem('reqwise_history_v1', ...)`
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 💻 TypeScript Data Models
|
|
136
|
+
|
|
137
|
+
### ReqwiseEntry
|
|
138
|
+
```typescript
|
|
139
|
+
interface ReqwiseEntry {
|
|
140
|
+
id: string // Unique ID (auto-generated)
|
|
141
|
+
source: "auto" | "manual" // auto: captured, manual: Send tab
|
|
142
|
+
page: string // window.location.href at capture time
|
|
143
|
+
timestamp: string // ISO 8601 timestamp
|
|
144
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"
|
|
145
|
+
url: string // Full URL or relative path
|
|
146
|
+
params?: Record<string, unknown> // Query parameters
|
|
147
|
+
requestHeaders?: Record<string, string>
|
|
148
|
+
requestBody?: unknown // JSON or FormData
|
|
149
|
+
status?: number // HTTP status (200, 404, 500, etc.)
|
|
150
|
+
statusText?: string // Status text ("OK", "Not Found", etc.)
|
|
151
|
+
responseHeaders?: Record<string, string>
|
|
152
|
+
responseBody?: unknown // Response JSON/text
|
|
153
|
+
duration?: number // Round-trip time in milliseconds
|
|
154
|
+
error?: { message: string; stack?: string }
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### ReqwiseConfig
|
|
159
|
+
```typescript
|
|
160
|
+
interface ReqwiseConfig {
|
|
161
|
+
// UI & Display
|
|
162
|
+
theme?: "light" | "dark" | "system" // default: "system"
|
|
163
|
+
placement?: "top" | "right" | "bottom" | "left" // default: "right"
|
|
164
|
+
defaultOpen?: boolean // default: false
|
|
165
|
+
show?: "general" | "detailed" // default: "general"
|
|
166
|
+
size?: "sm" | "md" | "lg" | "full" // default: "md"
|
|
167
|
+
opacity?: number // 0.0-1.0, default: 1.0
|
|
168
|
+
|
|
169
|
+
// Control
|
|
170
|
+
enabled?: boolean // default: true
|
|
171
|
+
hotkey?: string // default: "ctrl+shift+e"
|
|
172
|
+
axiosInstance?: unknown // Optional Axios instance
|
|
173
|
+
|
|
174
|
+
// Storage
|
|
175
|
+
persistHistory?: boolean // default: true
|
|
176
|
+
maxItems?: number // default: 200
|
|
177
|
+
historyTTL?: number // TTL in days, default: undefined (no expiry)
|
|
178
|
+
|
|
179
|
+
// Filtering
|
|
180
|
+
ignore?: string[] // default: []
|
|
181
|
+
maskHeaders?: string[] // default: []
|
|
182
|
+
maskFields?: string[] // default: []
|
|
183
|
+
|
|
184
|
+
// i18n
|
|
185
|
+
langs?: SupportedLang[] // default: ["en"]
|
|
186
|
+
defaultLang?: SupportedLang // Auto-detected from browser
|
|
187
|
+
|
|
188
|
+
// v1.1 Callbacks
|
|
189
|
+
onRequest?: (entry: Partial<ReqwiseEntry>) => void
|
|
190
|
+
onResponse?: (entry: ReqwiseEntry) => void
|
|
191
|
+
onError?: (entry: ReqwiseEntry) => void
|
|
192
|
+
|
|
193
|
+
// v1.1 UX
|
|
194
|
+
groupBy?: "url" | "method" | "status" | "page"
|
|
195
|
+
highlight?: "error" | "slow" | "none" // default: "error"
|
|
196
|
+
}
|
|
27
197
|
```
|
|
28
198
|
|
|
29
199
|
---
|
|
30
200
|
|
|
31
|
-
##
|
|
201
|
+
## ⚙️ Core Modules
|
|
202
|
+
|
|
203
|
+
### `client.ts` — HTTP Interception Engine
|
|
204
|
+
- `initClient(config)` — Initialize with configuration
|
|
205
|
+
- `recordPartial(entry)` — Record partial entry (request or response)
|
|
206
|
+
- `wrapAxios(instance)` — Setup Axios interceptors
|
|
207
|
+
- `get/post/put/patch/delete(url, data?, config?)` — HTTP methods with fallback to fetch
|
|
32
208
|
|
|
33
|
-
|
|
209
|
+
### `storage.ts` — Persistent & In-Memory Storage
|
|
210
|
+
- `initStorage(config)` — Setup storage backend
|
|
211
|
+
- `saveEntry(entry)` — Save entry to memory and localStorage (if enabled)
|
|
212
|
+
- `getEntries()` — Retrieve all entries (newest first)
|
|
213
|
+
- `subscribe(callback)` — Listen for storage changes
|
|
214
|
+
- TTL enforcement — auto-delete entries older than `historyTTL` days
|
|
215
|
+
- Limit enforcement — keep only latest `maxItems` entries
|
|
34
216
|
|
|
35
|
-
|
|
217
|
+
### `filter.ts` — Security & Pattern Matching
|
|
218
|
+
- `shouldIgnore(url)` — Check if URL matches ignore patterns
|
|
219
|
+
- `maskHeaders(headers)` — Redact sensitive headers with `****`
|
|
220
|
+
- `maskFields(obj)` — Recursively redact nested object fields
|
|
221
|
+
- Pattern matching — supports regex and substring matching
|
|
36
222
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
223
|
+
### `panel.ts` — DOM & Hotkey Management
|
|
224
|
+
- `mount(config)` — Inject panel into document.body
|
|
225
|
+
- `unmount()` — Remove panel and clean up event listeners
|
|
226
|
+
- `open()` / `close()` / `toggle()` — Panel state management
|
|
227
|
+
- Hotkey listener — parse and bind keyboard shortcut
|
|
228
|
+
- Placement handling — position panel relative to viewport
|
|
229
|
+
- Theme application — data-theme attribute for CSS scoping
|
|
230
|
+
|
|
231
|
+
### `renderer.ts` — Tab System & UI Rendering
|
|
232
|
+
- `renderTabs()` — Render and switch between 4 tabs
|
|
233
|
+
- `renderCurrent()` — Show requests from current page
|
|
234
|
+
- `renderHistory()` — Show all requests with filters
|
|
235
|
+
- `renderSendRequest()` — Mini HTTP client form
|
|
236
|
+
- `renderEndpoints()` — API endpoint analytics
|
|
237
|
+
- Event listeners — "Send" button, tab switching, form submission
|
|
238
|
+
|
|
239
|
+
### `i18n.ts` — Translation Catalog
|
|
240
|
+
- `t(key, lang)` — Get translated string
|
|
241
|
+
- `setLanguage(lang)` — Update active language
|
|
242
|
+
- **Supported languages:** en, tr, az, ru, de, fr, es, pt, zh, ja, ar, ko, it, pl, nl
|
|
243
|
+
- Fallback to English if key not found
|
|
244
|
+
|
|
245
|
+
### `types.ts` — TypeScript Interfaces
|
|
246
|
+
- `HttpMethod` — "GET" | "POST" | "PUT" | "PATCH" | "DELETE"
|
|
247
|
+
- `SupportedLang` — 15 language codes
|
|
248
|
+
- `ReqwiseEntry` — Request/response data shape
|
|
249
|
+
- `ReqwiseConfig` — Configuration options
|
|
250
|
+
- `RequestConfig` — Axios request config shape
|
|
251
|
+
|
|
252
|
+
### `logo.ts` — Embedded Assets
|
|
253
|
+
- `REQWISE_ICON_32` — 32x32px base64-encoded PNG icon (~2KB)
|
|
254
|
+
- `REQWISE_ICON_48` — 48x48px base64-encoded PNG icon (~3KB)
|
|
255
|
+
- Used for panel header and toggle button
|
|
256
|
+
|
|
257
|
+
### `styles.ts` — Scoped CSS
|
|
258
|
+
- All styles scoped to `#reqwise-panel` (no `:root` pollution)
|
|
259
|
+
- Theme variants (light, dark, system) via `[data-theme]` attribute
|
|
260
|
+
- Placement variants (top, right, bottom, left) via `[data-placement]` attribute
|
|
261
|
+
- Smooth animations and transitions
|
|
262
|
+
- Dark mode support with backdrop blur
|
|
42
263
|
|
|
43
264
|
---
|
|
44
265
|
|
|
45
|
-
## 🛠️
|
|
266
|
+
## 🛠️ Configuration Examples
|
|
267
|
+
|
|
268
|
+
### Minimal Setup
|
|
269
|
+
```typescript
|
|
270
|
+
import { panel, client } from '@reqwise-core'
|
|
271
|
+
|
|
272
|
+
// Initialize client
|
|
273
|
+
client.initClient({ enabled: true })
|
|
46
274
|
|
|
47
|
-
|
|
275
|
+
// Mount panel
|
|
276
|
+
panel.mount()
|
|
277
|
+
```
|
|
48
278
|
|
|
279
|
+
### Production Configuration
|
|
49
280
|
```typescript
|
|
50
|
-
import
|
|
281
|
+
import axios from 'axios'
|
|
282
|
+
import { panel, client } from '@reqwise-core'
|
|
51
283
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
284
|
+
const api = axios.create({
|
|
285
|
+
baseURL: 'https://api.example.com',
|
|
286
|
+
timeout: 5000,
|
|
287
|
+
})
|
|
288
|
+
|
|
289
|
+
client.initClient({
|
|
290
|
+
enabled: process.env.NODE_ENV === 'development',
|
|
291
|
+
theme: 'dark',
|
|
292
|
+
placement: 'right',
|
|
293
|
+
defaultOpen: false,
|
|
56
294
|
maxItems: 500,
|
|
57
295
|
persistHistory: true,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
296
|
+
langs: ['en', 'tr'],
|
|
297
|
+
defaultLang: 'en',
|
|
298
|
+
ignore: ['/health', '/ping', 'analytics.google.com'],
|
|
299
|
+
maskHeaders: ['Authorization', 'X-API-Key'],
|
|
300
|
+
maskFields: ['password', 'ssn', 'cvv', 'token'],
|
|
301
|
+
hotkey: 'ctrl+shift+e',
|
|
302
|
+
// v1.1 Callbacks
|
|
303
|
+
onRequest: (entry) => console.log('Request:', entry.method, entry.url),
|
|
304
|
+
onResponse: (entry) => {
|
|
305
|
+
if (entry.duration && entry.duration > 1000) {
|
|
306
|
+
console.warn('Slow request:', entry.url, `${entry.duration}ms`)
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
onError: (entry) => console.error('API Error:', entry.status, entry.url),
|
|
310
|
+
})
|
|
311
|
+
|
|
312
|
+
// Wrap Axios
|
|
313
|
+
client.wrapAxios(api)
|
|
314
|
+
|
|
315
|
+
// Mount panel
|
|
316
|
+
panel.mount({
|
|
317
|
+
placement: 'right',
|
|
318
|
+
theme: 'dark',
|
|
319
|
+
size: 'md',
|
|
320
|
+
opacity: 0.98,
|
|
321
|
+
})
|
|
61
322
|
```
|
|
62
323
|
|
|
324
|
+
### Advanced: With Callbacks & Filtering
|
|
325
|
+
```typescript
|
|
326
|
+
client.initClient({
|
|
327
|
+
ignore: [
|
|
328
|
+
'/metrics',
|
|
329
|
+
'cdn.jsdelivr.net',
|
|
330
|
+
'google-analytics',
|
|
331
|
+
'*.png', '*.jpg', '*.css' // file extensions
|
|
332
|
+
],
|
|
333
|
+
maskHeaders: ['Authorization', 'X-CSRF-Token', 'Set-Cookie'],
|
|
334
|
+
maskFields: ['password', 'pin', 'secret_key', 'access_token'],
|
|
335
|
+
historyTTL: 7, // Auto-delete entries older than 7 days
|
|
336
|
+
groupBy: 'url', // Group requests by endpoint
|
|
337
|
+
highlight: 'slow', // Highlight requests > 500ms
|
|
338
|
+
onError: (entry) => {
|
|
339
|
+
// Send to error tracking service
|
|
340
|
+
Sentry.captureException(new Error(`API Error: ${entry.status} ${entry.url}`))
|
|
341
|
+
},
|
|
342
|
+
})
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 🔌 API Reference
|
|
348
|
+
|
|
349
|
+
### Client Methods
|
|
350
|
+
```typescript
|
|
351
|
+
// These are available from @reqwise-core → client module
|
|
352
|
+
client.initClient(config?)
|
|
353
|
+
client.recordPartial(entry)
|
|
354
|
+
client.wrapAxios(axiosInstance)
|
|
355
|
+
client.get(url, config?)
|
|
356
|
+
client.post(url, body?, config?)
|
|
357
|
+
client.put(url, body?, config?)
|
|
358
|
+
client.patch(url, body?, config?)
|
|
359
|
+
client.delete(url, config?)
|
|
360
|
+
client.fetch(url, options?) // native fetch wrapper
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Storage Methods
|
|
364
|
+
```typescript
|
|
365
|
+
storage.initStorage(config?)
|
|
366
|
+
storage.saveEntry(entry)
|
|
367
|
+
storage.getEntries() // returns all entries
|
|
368
|
+
storage.subscribe(callback) // listen for changes
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Panel Methods
|
|
372
|
+
```typescript
|
|
373
|
+
panel.mount(config?)
|
|
374
|
+
panel.unmount()
|
|
375
|
+
panel.open()
|
|
376
|
+
panel.close()
|
|
377
|
+
panel.toggle()
|
|
378
|
+
panel.setRenderer(rendererFn)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### i18n Methods
|
|
382
|
+
```typescript
|
|
383
|
+
i18n.t(key, lang?) // Get translation
|
|
384
|
+
i18n.setLanguage(lang) // Set active language
|
|
385
|
+
i18n.getLanguage() // Get current language
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Filter Methods
|
|
389
|
+
```typescript
|
|
390
|
+
filter.shouldIgnore(url)
|
|
391
|
+
filter.maskHeaders(headers)
|
|
392
|
+
filter.maskFields(obj)
|
|
393
|
+
filter.setConfig(config)
|
|
394
|
+
filter.addIgnorePattern(pattern)
|
|
395
|
+
filter.removeIgnorePattern(pattern)
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## 🌐 Supported Languages
|
|
401
|
+
|
|
402
|
+
| Code | Language | Code | Language |
|
|
403
|
+
|------|----------|------|----------|
|
|
404
|
+
| en | English | tr | Türkçe (Turkish) |
|
|
405
|
+
| az | Azərbaycanca | ru | Русский (Russian) |
|
|
406
|
+
| de | Deutsch | fr | Français |
|
|
407
|
+
| es | Español | pt | Português |
|
|
408
|
+
| zh | 中文 (Chinese) | ja | 日本語 (Japanese) |
|
|
409
|
+
| ar | العربية (Arabic) | ko | 한국어 (Korean) |
|
|
410
|
+
| it | Italiano | pl | Polski |
|
|
411
|
+
| nl | Nederlands |
|
|
412
|
+
|
|
63
413
|
---
|
|
64
414
|
|
|
65
|
-
##
|
|
415
|
+
## 📊 Browser & Environment Support
|
|
66
416
|
|
|
67
|
-
|
|
417
|
+
- **Node.js:** 14+ (for SSR checks, no DOM operations)
|
|
418
|
+
- **Browsers:** Chrome, Firefox, Safari, Edge (all modern versions)
|
|
419
|
+
- **React:** 17+ (via `@reqwise/react`)
|
|
420
|
+
- **Framework:** Vanilla TS (framework-agnostic)
|
|
68
421
|
|
|
69
|
-
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
## 🔒 Security & Privacy Considerations
|
|
425
|
+
|
|
426
|
+
1. **No Network Calls:** Reqwise never sends data anywhere — everything stays in localStorage/memory
|
|
427
|
+
2. **Masking Works Offline:** Sensitive data is redacted before anything is stored
|
|
428
|
+
3. **Development-Only:** Disable in production with `enabled: false`
|
|
429
|
+
4. **localStorage Isolation:** Uses dedicated key `reqwise_history_v1` — no conflicts
|
|
430
|
+
5. **GDPR Friendly:** TTL support lets you auto-delete old data
|
|
431
|
+
6. **CSP Compatible:** No eval, no inline scripts, safe for strict CSP policies
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## 🚀 Performance Considerations
|
|
436
|
+
|
|
437
|
+
- **Bundle Size:** ~15KB gzipped (core package only)
|
|
438
|
+
- **Runtime Overhead:** <2ms per request (timing measurement)
|
|
439
|
+
- **Memory Usage:** ~100KB for 200 entries (default limit)
|
|
440
|
+
- **Storage:** ~50KB in localStorage for 200 typical entries
|
|
441
|
+
- **No Memory Leaks:** Proper cleanup on panel unmount
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## 📝 Changelog
|
|
446
|
+
|
|
447
|
+
### v1.1.3 (Current)
|
|
448
|
+
- Improved documentation with comprehensive examples
|
|
449
|
+
- Enhanced TypeScript types and interfaces
|
|
450
|
+
- Stable callback system (onRequest, onResponse, onError)
|
|
451
|
+
- TTL support for automatic history cleanup
|
|
452
|
+
- Better error handling and logging
|
|
453
|
+
|
|
454
|
+
### v1.1.2
|
|
455
|
+
- Added callback hooks (onRequest, onResponse, onError)
|
|
456
|
+
- Introduced TTL (Time-To-Live) for history entries
|
|
457
|
+
- Enhanced filtering capabilities
|
|
458
|
+
- Improved renderer performance
|
|
459
|
+
|
|
460
|
+
### v1.1.0
|
|
461
|
+
- Introduced Endpoints tab with auto-discovery
|
|
462
|
+
- Added size and opacity props
|
|
463
|
+
- Improved UI responsiveness
|
|
464
|
+
|
|
465
|
+
### v1.0.0
|
|
466
|
+
- Initial release with core features
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
## 📄 License
|
|
471
|
+
|
|
472
|
+
MIT © Ali Zadeh
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## 🤝 Contributing
|
|
477
|
+
|
|
478
|
+
Contributions are welcome! Please submit issues or pull requests to improve Reqwise.
|
|
479
|
+
|
|
480
|
+
---
|
|
70
481
|
|
|
71
|
-
|
|
482
|
+
**Reqwise** makes debugging HTTP requests in development dramatically easier. Enjoy! 🎉
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reqwise-core",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"description": "Production-ready HTTP interceptor and floating developer panel. Captures Axios/Fetch requests, logs them to localStorage, and renders a real-time inspector panel. Supports 15 languages, security masking, hotkey shortcuts, and more.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com",
|
|
22
|
-
"directory": "packages
|
|
22
|
+
"directory": "packages-core"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com"
|