reqwise-core 1.0.0 → 1.1.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 ADDED
@@ -0,0 +1,71 @@
1
+ # @reqwise/core 🚀
2
+
3
+ > **Reqwise**, React və vanilla JavaScript tətbiqlərində edilən HTTP API istəklərini (Axios/Fetch) tutan, qeyd edən və tətbiq daxilində vizuallaşdıran güclü bir tərtibatçı (developer) alətidir.
4
+
5
+ Tətbiqinizin içində mini bir **Postman** və ya **Chrome DevTools Network** paneli kimi işləyir. Sayfada üzən (floating aside) bir panel vasitəsilə istəkləri real vaxt rejimində izləyə, tarixçəyə baxa və tək kliklə test istəkləri göndərə bilərsiniz.
6
+
7
+ ---
8
+
9
+ ## ✨ Özəlliklər
10
+
11
+ - 🔄 **Tam HTTP İzləmə:** `ReqwiseClient` üzərindən keçən bütün Payload-ları (method, url, body, headers, duration, response) avtomatik qeyd edir.
12
+ - 💾 **Davamlılıq (Persistence):** İstəkləri `localStorage` (`reqwise_log` açarı) üzərində saxlayır, səhifə yenilənsə belə itmir.
13
+ - 🛡️ **Təhlükəsizlik (Masking):** Həssas məlumatları gizlətmək üçün `maskHeaders` (məs. Authorization) və `maskFields` (məs. password) dəstəyi.
14
+ - 🌍 **Beynəlmiləlləşdirmə (i18n):** Daxili 15 dil dəstəyi və ağıllı `t(key, lang)` köməkçisi.
15
+ - ⌨️ **Hotkey Dəstəyi:** Özəlləşdirilə bilən qısayollar (məs. `ctrl+shift+e`) ilə paneli gizlədib-açma.
16
+
17
+ ---
18
+
19
+ ## 📦 Qurulum (Installation)
20
+
21
+ Paketi layihənizə `npm` və ya `pnpm` vasitəsilə əlavə edin:
22
+
23
+ ```bash
24
+ npm install @reqwise/core
25
+ # və ya
26
+ pnpm add @reqwise/core
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 🚀 İşləmə Məntiqi (Architecture Flow)
32
+
33
+ Reqwise tətbiqiniz ilə backend arasında bir körpü rolunu oynayır:
34
+
35
+ front ➔ ReqwiseClient ➔ axios (və ya fetch fallback) ➔ backend
36
+
37
+ 1. İstək göndərilir ➔ Payload (`ReqwiseEntry` formatında) qeyd olunur.
38
+ 2. Gerçək HTTP istəyi icra edilir.
39
+ 3. Cavab (Response) alınır ➔ Müddət (duration) və status qeyd olunur.
40
+ 4. Məlumatlar `reqwise_log` ilə local-a yazılır və `reqwise:update` eventi tetiklenir.
41
+ 5. DOM-a yeridilmiş `#reqwise-panel` interfeysi dərhal yenilənir.
42
+
43
+ ---
44
+
45
+ ## 🛠️ Konfiqurasiya Nümunəsi
46
+
47
+ Projenin core tərəfini başlamaq üçün `core.configure()` funksiyasından istifadə olunur:
48
+
49
+ ```typescript
50
+ import { core } from "@reqwise/core";
51
+
52
+ core.configure({
53
+ theme: "dark",
54
+ placement: "right",
55
+ enabled: true,
56
+ maxItems: 500,
57
+ persistHistory: true,
58
+ ignore: ["/health", "/ping"],
59
+ maskHeaders: ["Authorization"]
60
+ });
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 🤖 Reqwise Development Agent (RDA)
66
+
67
+ Bu layihə **RDA (Reqwise Development Agent)** adlı xüsusi bir AI arxitekturası tərəfindən idarə olunur və inkişaf etdirilir. RDA layihənin struktur bütövlüyünü qorumaq, `.b64.txt` kimi böyük faylların bundle-a girməsinin qarşısını almaq (`/bundle-check`) və ciddi isimləndirmə qaydalarına riayət etmək üçün xüsusi əmrlərə (`/status`, `/fix`, `/checklist`) malikdir.
68
+
69
+ ## 📄 Lisenziya
70
+
71
+ MIT © Alizadeh
package/dist/index.d.mts CHANGED
@@ -46,11 +46,21 @@ declare function initClient(c?: Partial<ReqwiseConfig>): void;
46
46
  declare function recordPartial(entry: Partial<ReqwiseEntry>): void;
47
47
  declare function wrapAxios(instance: any): void;
48
48
  declare function fetchWithRecord(input: RequestInfo, init?: RequestInit & RequestConfig): Promise<Response>;
49
+ declare function get(url: string, config?: RequestConfig): Promise<any>;
50
+ declare function post(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
51
+ declare function put(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
52
+ declare function patch(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
53
+ declare function del(url: string, config?: RequestConfig): Promise<any>;
49
54
  declare const ReqwiseClient: {
50
55
  init: typeof initClient;
51
56
  wrapAxios: typeof wrapAxios;
52
57
  fetch: typeof fetchWithRecord;
53
58
  record: typeof recordPartial;
59
+ get: typeof get;
60
+ post: typeof post;
61
+ put: typeof put;
62
+ patch: typeof patch;
63
+ delete: typeof del;
54
64
  };
55
65
 
56
66
  type Translations = Record<string, string>;
@@ -104,7 +114,7 @@ interface PanelConfig {
104
114
  defaultOpen?: boolean;
105
115
  placement?: Placement;
106
116
  hotkey?: string;
107
- theme?: 'dark' | 'light' | 'auto';
117
+ theme?: 'dark' | 'light' | 'system';
108
118
  }
109
119
  type RendererFn = (container: HTMLElement) => void;
110
120
  declare const panel: {
@@ -150,6 +160,11 @@ declare const _default: {
150
160
  wrapAxios: typeof wrapAxios;
151
161
  fetch: typeof fetchWithRecord;
152
162
  record: typeof recordPartial;
163
+ get: typeof get;
164
+ post: typeof post;
165
+ put: typeof put;
166
+ patch: typeof patch;
167
+ delete: typeof del;
153
168
  };
154
169
  };
155
170
 
package/dist/index.d.ts CHANGED
@@ -46,11 +46,21 @@ declare function initClient(c?: Partial<ReqwiseConfig>): void;
46
46
  declare function recordPartial(entry: Partial<ReqwiseEntry>): void;
47
47
  declare function wrapAxios(instance: any): void;
48
48
  declare function fetchWithRecord(input: RequestInfo, init?: RequestInit & RequestConfig): Promise<Response>;
49
+ declare function get(url: string, config?: RequestConfig): Promise<any>;
50
+ declare function post(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
51
+ declare function put(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
52
+ declare function patch(url: string, data?: unknown, config?: RequestConfig): Promise<any>;
53
+ declare function del(url: string, config?: RequestConfig): Promise<any>;
49
54
  declare const ReqwiseClient: {
50
55
  init: typeof initClient;
51
56
  wrapAxios: typeof wrapAxios;
52
57
  fetch: typeof fetchWithRecord;
53
58
  record: typeof recordPartial;
59
+ get: typeof get;
60
+ post: typeof post;
61
+ put: typeof put;
62
+ patch: typeof patch;
63
+ delete: typeof del;
54
64
  };
55
65
 
56
66
  type Translations = Record<string, string>;
@@ -104,7 +114,7 @@ interface PanelConfig {
104
114
  defaultOpen?: boolean;
105
115
  placement?: Placement;
106
116
  hotkey?: string;
107
- theme?: 'dark' | 'light' | 'auto';
117
+ theme?: 'dark' | 'light' | 'system';
108
118
  }
109
119
  type RendererFn = (container: HTMLElement) => void;
110
120
  declare const panel: {
@@ -150,6 +160,11 @@ declare const _default: {
150
160
  wrapAxios: typeof wrapAxios;
151
161
  fetch: typeof fetchWithRecord;
152
162
  record: typeof recordPartial;
163
+ get: typeof get;
164
+ post: typeof post;
165
+ put: typeof put;
166
+ patch: typeof patch;
167
+ delete: typeof del;
153
168
  };
154
169
  };
155
170