recker 1.0.2-0

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 (158) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/cache/file-storage.d.ts +13 -0
  4. package/dist/cache/file-storage.d.ts.map +1 -0
  5. package/dist/cache/file-storage.js +50 -0
  6. package/dist/cache/memory-storage.d.ts +10 -0
  7. package/dist/cache/memory-storage.d.ts.map +1 -0
  8. package/dist/cache/memory-storage.js +29 -0
  9. package/dist/cache/redis-storage.d.ts +16 -0
  10. package/dist/cache/redis-storage.d.ts.map +1 -0
  11. package/dist/cache/redis-storage.js +25 -0
  12. package/dist/constants.d.ts +19 -0
  13. package/dist/constants.d.ts.map +1 -0
  14. package/dist/constants.js +18 -0
  15. package/dist/contract/index.d.ts +32 -0
  16. package/dist/contract/index.d.ts.map +1 -0
  17. package/dist/contract/index.js +67 -0
  18. package/dist/core/client.d.ts +107 -0
  19. package/dist/core/client.d.ts.map +1 -0
  20. package/dist/core/client.js +475 -0
  21. package/dist/core/errors.d.ts +19 -0
  22. package/dist/core/errors.d.ts.map +1 -0
  23. package/dist/core/errors.js +34 -0
  24. package/dist/core/request-promise.d.ts +24 -0
  25. package/dist/core/request-promise.d.ts.map +1 -0
  26. package/dist/core/request-promise.js +77 -0
  27. package/dist/core/request.d.ts +15 -0
  28. package/dist/core/request.d.ts.map +1 -0
  29. package/dist/core/request.js +44 -0
  30. package/dist/core/response.d.ts +33 -0
  31. package/dist/core/response.d.ts.map +1 -0
  32. package/dist/core/response.js +154 -0
  33. package/dist/index.d.ts +40 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +39 -0
  36. package/dist/mcp/client.d.ts +59 -0
  37. package/dist/mcp/client.d.ts.map +1 -0
  38. package/dist/mcp/client.js +195 -0
  39. package/dist/mcp/index.d.ts +3 -0
  40. package/dist/mcp/index.d.ts.map +1 -0
  41. package/dist/mcp/index.js +2 -0
  42. package/dist/mcp/types.d.ts +151 -0
  43. package/dist/mcp/types.d.ts.map +1 -0
  44. package/dist/mcp/types.js +1 -0
  45. package/dist/plugins/cache.d.ts +10 -0
  46. package/dist/plugins/cache.d.ts.map +1 -0
  47. package/dist/plugins/cache.js +72 -0
  48. package/dist/plugins/circuit-breaker.d.ts +14 -0
  49. package/dist/plugins/circuit-breaker.d.ts.map +1 -0
  50. package/dist/plugins/circuit-breaker.js +100 -0
  51. package/dist/plugins/compression.d.ts +5 -0
  52. package/dist/plugins/compression.d.ts.map +1 -0
  53. package/dist/plugins/compression.js +128 -0
  54. package/dist/plugins/cookie-jar.d.ts +6 -0
  55. package/dist/plugins/cookie-jar.d.ts.map +1 -0
  56. package/dist/plugins/cookie-jar.js +72 -0
  57. package/dist/plugins/dedup.d.ts +6 -0
  58. package/dist/plugins/dedup.d.ts.map +1 -0
  59. package/dist/plugins/dedup.js +34 -0
  60. package/dist/plugins/graphql.d.ts +13 -0
  61. package/dist/plugins/graphql.d.ts.map +1 -0
  62. package/dist/plugins/graphql.js +39 -0
  63. package/dist/plugins/har-player.d.ts +7 -0
  64. package/dist/plugins/har-player.d.ts.map +1 -0
  65. package/dist/plugins/har-player.js +53 -0
  66. package/dist/plugins/har-recorder.d.ts +7 -0
  67. package/dist/plugins/har-recorder.d.ts.map +1 -0
  68. package/dist/plugins/har-recorder.js +67 -0
  69. package/dist/plugins/logger.d.ts +11 -0
  70. package/dist/plugins/logger.d.ts.map +1 -0
  71. package/dist/plugins/logger.js +72 -0
  72. package/dist/plugins/pagination.d.ts +17 -0
  73. package/dist/plugins/pagination.d.ts.map +1 -0
  74. package/dist/plugins/pagination.js +105 -0
  75. package/dist/plugins/proxy-rotator.d.ts +8 -0
  76. package/dist/plugins/proxy-rotator.d.ts.map +1 -0
  77. package/dist/plugins/proxy-rotator.js +35 -0
  78. package/dist/plugins/rate-limit.d.ts +8 -0
  79. package/dist/plugins/rate-limit.d.ts.map +1 -0
  80. package/dist/plugins/rate-limit.js +57 -0
  81. package/dist/plugins/retry.d.ts +14 -0
  82. package/dist/plugins/retry.d.ts.map +1 -0
  83. package/dist/plugins/retry.js +92 -0
  84. package/dist/plugins/server-timing.d.ts +8 -0
  85. package/dist/plugins/server-timing.d.ts.map +1 -0
  86. package/dist/plugins/server-timing.js +24 -0
  87. package/dist/plugins/xsrf.d.ts +10 -0
  88. package/dist/plugins/xsrf.d.ts.map +1 -0
  89. package/dist/plugins/xsrf.js +48 -0
  90. package/dist/runner/request-runner.d.ts +47 -0
  91. package/dist/runner/request-runner.d.ts.map +1 -0
  92. package/dist/runner/request-runner.js +89 -0
  93. package/dist/transport/fetch.d.ts +6 -0
  94. package/dist/transport/fetch.d.ts.map +1 -0
  95. package/dist/transport/fetch.js +153 -0
  96. package/dist/transport/undici.d.ts +23 -0
  97. package/dist/transport/undici.d.ts.map +1 -0
  98. package/dist/transport/undici.js +218 -0
  99. package/dist/types/index.d.ts +251 -0
  100. package/dist/types/index.d.ts.map +1 -0
  101. package/dist/types/index.js +1 -0
  102. package/dist/utils/agent-manager.d.ts +29 -0
  103. package/dist/utils/agent-manager.d.ts.map +1 -0
  104. package/dist/utils/agent-manager.js +133 -0
  105. package/dist/utils/body.d.ts +11 -0
  106. package/dist/utils/body.d.ts.map +1 -0
  107. package/dist/utils/body.js +136 -0
  108. package/dist/utils/cert.d.ts +12 -0
  109. package/dist/utils/cert.d.ts.map +1 -0
  110. package/dist/utils/cert.js +32 -0
  111. package/dist/utils/concurrency.d.ts +21 -0
  112. package/dist/utils/concurrency.d.ts.map +1 -0
  113. package/dist/utils/concurrency.js +116 -0
  114. package/dist/utils/dns.d.ts +7 -0
  115. package/dist/utils/dns.d.ts.map +1 -0
  116. package/dist/utils/dns.js +26 -0
  117. package/dist/utils/doh.d.ts +3 -0
  118. package/dist/utils/doh.d.ts.map +1 -0
  119. package/dist/utils/doh.js +35 -0
  120. package/dist/utils/header-parser.d.ts +81 -0
  121. package/dist/utils/header-parser.d.ts.map +1 -0
  122. package/dist/utils/header-parser.js +457 -0
  123. package/dist/utils/html-cleaner.d.ts +2 -0
  124. package/dist/utils/html-cleaner.d.ts.map +1 -0
  125. package/dist/utils/html-cleaner.js +21 -0
  126. package/dist/utils/logger.d.ts +33 -0
  127. package/dist/utils/logger.d.ts.map +1 -0
  128. package/dist/utils/logger.js +160 -0
  129. package/dist/utils/progress.d.ts +4 -0
  130. package/dist/utils/progress.d.ts.map +1 -0
  131. package/dist/utils/progress.js +49 -0
  132. package/dist/utils/request-pool.d.ts +23 -0
  133. package/dist/utils/request-pool.d.ts.map +1 -0
  134. package/dist/utils/request-pool.js +100 -0
  135. package/dist/utils/sse.d.ts +8 -0
  136. package/dist/utils/sse.d.ts.map +1 -0
  137. package/dist/utils/sse.js +62 -0
  138. package/dist/utils/streaming.d.ts +18 -0
  139. package/dist/utils/streaming.d.ts.map +1 -0
  140. package/dist/utils/streaming.js +83 -0
  141. package/dist/utils/task-pool.d.ts +38 -0
  142. package/dist/utils/task-pool.js +104 -0
  143. package/dist/utils/try-fn.d.ts +4 -0
  144. package/dist/utils/try-fn.d.ts.map +1 -0
  145. package/dist/utils/try-fn.js +53 -0
  146. package/dist/utils/upload.d.ts +10 -0
  147. package/dist/utils/upload.d.ts.map +1 -0
  148. package/dist/utils/upload.js +45 -0
  149. package/dist/utils/user-agent.d.ts +45 -0
  150. package/dist/utils/user-agent.d.ts.map +1 -0
  151. package/dist/utils/user-agent.js +100 -0
  152. package/dist/utils/whois.d.ts +15 -0
  153. package/dist/utils/whois.d.ts.map +1 -0
  154. package/dist/utils/whois.js +159 -0
  155. package/dist/websocket/client.d.ts +38 -0
  156. package/dist/websocket/client.d.ts.map +1 -0
  157. package/dist/websocket/client.js +184 -0
  158. package/package.json +100 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Forattini Development
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ # Recker
2
+
3
+ <div align="center">
4
+ <h1>The HTTP Client for the AI Era</h1>
5
+
6
+ <p>
7
+ Build resilient, type-safe, and high-performance integrations with the
8
+ <strong>Smart SDK Builder</strong> designed for modern backend ecosystems.
9
+ </p>
10
+
11
+ <p>
12
+ <a href="https://www.npmjs.com/package/recker">
13
+ <img src="https://img.shields.io/npm/v/recker.svg?style=flat-square&color=F5A623" alt="npm version" />
14
+ </a>
15
+ <a href="https://github.com/your-org/recker/blob/main/LICENSE">
16
+ <img src="https://img.shields.io/npm/l/recker.svg?style=flat-square&color=007AFF" alt="license" />
17
+ </a>
18
+ <img src="https://img.shields.io/badge/coverage-100%25-34C759?style=flat-square" alt="coverage" />
19
+ <img src="https://img.shields.io/badge/types-included-34C759?style=flat-square" alt="types" />
20
+ </p>
21
+
22
+ <br />
23
+ </div>
24
+
25
+ ---
26
+
27
+ **Recker** is not just another `fetch` wrapper. It combines the ergonomics of `ky` with the resilience of `got` and the raw performance of `undici` into a unified **DevX Powerhouse**.
28
+
29
+ ## ⚡ Why Recker?
30
+
31
+ | Feature | Description |
32
+ | :--- | :--- |
33
+ | **🛡️ Contract-First** | Define Zod schemas and get a fully typed SDK. No more `any`. |
34
+ | **🚦 Task Pool** | Global Rate Limiting & Concurrency Control (Semaphore/Token Bucket). |
35
+ | **👁️ Visual Debug** | Beautiful "Matrix-style" logs and cURL export. |
36
+ | **🤖 AI Ready** | First-class Server-Sent Events (SSE) support for LLM streaming. |
37
+ | **🔌 Plug & Play** | Circuit Breaker, Deduplication, Caching (SWR), and Retry built-in. |
38
+ | **🌐 Universal** | Works in Node.js (Undici) and Edge/Browsers (Fetch). |
39
+
40
+ ## 📦 Installation
41
+
42
+ ```bash
43
+ npm install recker undici zod
44
+ ```
45
+
46
+ ## 🚀 Quick Start
47
+
48
+ ### 1. The "Classic" Way
49
+ Simple and intuitive API with better defaults and full type safety.
50
+
51
+ ```typescript
52
+ import { createClient } from 'recker';
53
+
54
+ const client = createClient({
55
+ baseUrl: 'https://jsonplaceholder.typicode.com'
56
+ });
57
+
58
+ // Auto-parse JSON, Typed response
59
+ const todo = await client.get<{ title: string }>('/todos/1').json();
60
+ console.log(todo.title);
61
+ ```
62
+
63
+ ### 2. The "Pro" Way (Contract-First)
64
+ Stop guessing URLs. Define your API contract.
65
+
66
+ ```typescript
67
+ import { z } from 'zod';
68
+ import { createContract } from 'recker';
69
+
70
+ const api = createContract(client, {
71
+ getUser: {
72
+ method: 'GET',
73
+ path: '/users/:id',
74
+ params: z.object({ id: z.string() }),
75
+ response: z.object({ name: z.string() })
76
+ }
77
+ });
78
+
79
+ // Fully typed! Typescript errors if you forget 'params.id'
80
+ const user = await api.getUser({ params: { id: '1' } });
81
+ ```
82
+
83
+ ### 3. The "Resilient" Way
84
+ Protect your downstream services with Circuit Breakers and Rate Limiting.
85
+
86
+ ```typescript
87
+ import { circuitBreaker, rateLimit } from 'recker';
88
+
89
+ const resilientClient = createClient({
90
+ // Never send more than 10 requests/sec
91
+ rateLimit: { requestsPerInterval: 10, interval: 1000 },
92
+ plugins: [
93
+ // Stop calling if 50% of requests fail
94
+ circuitBreaker({ threshold: 5 })
95
+ ]
96
+ });
97
+ ```
98
+
99
+ ## 📚 Documentation
100
+
101
+ Read the full documentation at [recker.js.org](https://recker.js.org) (mock link).
102
+
103
+ - [Client Configuration](/docs/guides/client-config.md)
104
+ - [Concurrency Guide](/docs/guides/concurrency.md)
105
+ - [Streaming & SSE](/docs/guides/streaming.md)
106
+
107
+ ## License
108
+
109
+ MIT
@@ -0,0 +1,13 @@
1
+ import { CacheEntry, CacheStorage } from '../types/index.js';
2
+ export declare class FileStorage implements CacheStorage {
3
+ private dir;
4
+ constructor(baseDir?: string);
5
+ private getHash;
6
+ private getPath;
7
+ private ensureDir;
8
+ get(key: string): Promise<CacheEntry | undefined>;
9
+ set(key: string, entry: CacheEntry, ttl?: number): Promise<void>;
10
+ delete(key: string): Promise<void>;
11
+ clear(): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=file-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-storage.d.ts","sourceRoot":"","sources":["../../src/cache/file-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM7D,qBAAa,WAAY,YAAW,YAAY;IAC9C,OAAO,CAAC,GAAG,CAAS;gBAER,OAAO,GAAE,MAAwB;IAI7C,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,OAAO;YAID,SAAS;IAMjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAqBjD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7B"}
@@ -0,0 +1,50 @@
1
+ import { mkdir, readFile, writeFile, unlink, rm } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { createHash } from 'node:crypto';
4
+ import { existsSync } from 'node:fs';
5
+ export class FileStorage {
6
+ dir;
7
+ constructor(baseDir = '.recker/cache') {
8
+ this.dir = baseDir;
9
+ }
10
+ getHash(key) {
11
+ return createHash('md5').update(key).digest('hex');
12
+ }
13
+ getPath(key) {
14
+ return join(this.dir, `${this.getHash(key)}.json`);
15
+ }
16
+ async ensureDir() {
17
+ if (!existsSync(this.dir)) {
18
+ await mkdir(this.dir, { recursive: true });
19
+ }
20
+ }
21
+ async get(key) {
22
+ try {
23
+ const path = this.getPath(key);
24
+ if (!existsSync(path))
25
+ return undefined;
26
+ const content = await readFile(path, 'utf-8');
27
+ const data = JSON.parse(content);
28
+ return data;
29
+ }
30
+ catch (error) {
31
+ return undefined;
32
+ }
33
+ }
34
+ async set(key, entry, ttl) {
35
+ await this.ensureDir();
36
+ const path = this.getPath(key);
37
+ await writeFile(path, JSON.stringify(entry), 'utf-8');
38
+ }
39
+ async delete(key) {
40
+ const path = this.getPath(key);
41
+ if (existsSync(path)) {
42
+ await unlink(path);
43
+ }
44
+ }
45
+ async clear() {
46
+ if (existsSync(this.dir)) {
47
+ await rm(this.dir, { recursive: true, force: true });
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,10 @@
1
+ import { CacheEntry, CacheStorage } from '../types/index.js';
2
+ export declare class MemoryStorage implements CacheStorage {
3
+ private storage;
4
+ private ttls;
5
+ get(key: string): Promise<CacheEntry | undefined>;
6
+ set(key: string, entry: CacheEntry, ttl?: number): Promise<void>;
7
+ delete(key: string): Promise<void>;
8
+ clear(): void;
9
+ }
10
+ //# sourceMappingURL=memory-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-storage.d.ts","sourceRoot":"","sources":["../../src/cache/memory-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE7D,qBAAa,aAAc,YAAW,YAAY;IAChD,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,IAAI,CAA6B;IAEnC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAajD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxC,KAAK;CAIN"}
@@ -0,0 +1,29 @@
1
+ export class MemoryStorage {
2
+ storage = new Map();
3
+ ttls = new Map();
4
+ async get(key) {
5
+ const entry = this.storage.get(key);
6
+ if (!entry)
7
+ return undefined;
8
+ const expiry = this.ttls.get(key);
9
+ if (expiry && Date.now() > expiry) {
10
+ this.delete(key);
11
+ return undefined;
12
+ }
13
+ return entry;
14
+ }
15
+ async set(key, entry, ttl) {
16
+ this.storage.set(key, entry);
17
+ if (ttl) {
18
+ this.ttls.set(key, Date.now() + ttl);
19
+ }
20
+ }
21
+ async delete(key) {
22
+ this.storage.delete(key);
23
+ this.ttls.delete(key);
24
+ }
25
+ clear() {
26
+ this.storage.clear();
27
+ this.ttls.clear();
28
+ }
29
+ }
@@ -0,0 +1,16 @@
1
+ import { CacheStorage, CacheEntry } from '../types/index.js';
2
+ interface RedisClient {
3
+ get(key: string): Promise<string | null>;
4
+ set(key: string, value: string, mode?: string, duration?: number): Promise<any>;
5
+ del(key: string): Promise<any>;
6
+ }
7
+ export declare class RedisStorage implements CacheStorage {
8
+ private redis;
9
+ private prefix;
10
+ constructor(redis: RedisClient, prefix?: string);
11
+ get(key: string): Promise<CacheEntry | undefined | null>;
12
+ set(key: string, value: CacheEntry, ttl: number): Promise<void>;
13
+ delete(key: string): Promise<void>;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=redis-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis-storage.d.ts","sourceRoot":"","sources":["../../src/cache/redis-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG7D,UAAU,WAAW;IACnB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAChF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAChC;AAED,qBAAa,YAAa,YAAW,YAAY;IACnC,OAAO,CAAC,KAAK;IAAe,OAAO,CAAC,MAAM;gBAAlC,KAAK,EAAE,WAAW,EAAU,MAAM,GAAE,MAAkB;IAEpE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAUxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzC"}
@@ -0,0 +1,25 @@
1
+ export class RedisStorage {
2
+ redis;
3
+ prefix;
4
+ constructor(redis, prefix = 'recker:') {
5
+ this.redis = redis;
6
+ this.prefix = prefix;
7
+ }
8
+ async get(key) {
9
+ const data = await this.redis.get(this.prefix + key);
10
+ if (!data)
11
+ return null;
12
+ try {
13
+ return JSON.parse(data);
14
+ }
15
+ catch {
16
+ return null;
17
+ }
18
+ }
19
+ async set(key, value, ttl) {
20
+ await this.redis.set(this.prefix + key, JSON.stringify(value), 'PX', ttl);
21
+ }
22
+ async delete(key) {
23
+ await this.redis.del(this.prefix + key);
24
+ }
25
+ }
@@ -0,0 +1,19 @@
1
+ export declare const DEFAULT_MAX_RETRY_DELAY_MS = 30000;
2
+ export declare const DEFAULT_RETRY_ATTEMPTS = 3;
3
+ export declare const DEFAULT_BASE_DELAY_MS = 100;
4
+ export declare const PROGRESS_THROTTLE_INTERVAL_MS = 100;
5
+ export declare const PROGRESS_UPDATES_PER_SECOND = 10;
6
+ export declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000;
7
+ export declare const DEFAULT_CONNECT_TIMEOUT_MS = 10000;
8
+ export declare const DEFAULT_CACHE_TTL_MS = 60000;
9
+ export declare const DEFAULT_STALE_TTL_MS = 300000;
10
+ export declare const DEFAULT_HTTP2_MAX_CONCURRENT_STREAMS = 100;
11
+ export declare const DEFAULT_HTTP1_PIPELINING = 1;
12
+ export declare const DEFAULT_COMPRESSION_THRESHOLD_BYTES = 1024;
13
+ export declare const DEFAULT_COMPRESSION_ALGORITHM: "gzip";
14
+ export declare const DEFAULT_MAX_PAGES: number;
15
+ export declare const DEFAULT_PAGE_PARAM = "page";
16
+ export declare const DEFAULT_LIMIT_PARAM = "limit";
17
+ export declare const DEFAULT_FAILURE_THRESHOLD = 5;
18
+ export declare const DEFAULT_RESET_TIMEOUT_MS = 60000;
19
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAGzC,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAGjD,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,SAAU,CAAC;AAG5C,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAG1C,eAAO,MAAM,mCAAmC,OAAO,CAAC;AACxD,eAAO,MAAM,6BAA6B,EAAG,MAAe,CAAC;AAG7D,eAAO,MAAM,iBAAiB,QAAW,CAAC;AAC1C,eAAO,MAAM,kBAAkB,SAAS,CAAC;AACzC,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAG3C,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,wBAAwB,QAAS,CAAC"}
@@ -0,0 +1,18 @@
1
+ export const DEFAULT_MAX_RETRY_DELAY_MS = 30_000;
2
+ export const DEFAULT_RETRY_ATTEMPTS = 3;
3
+ export const DEFAULT_BASE_DELAY_MS = 100;
4
+ export const PROGRESS_THROTTLE_INTERVAL_MS = 100;
5
+ export const PROGRESS_UPDATES_PER_SECOND = 10;
6
+ export const DEFAULT_REQUEST_TIMEOUT_MS = 30_000;
7
+ export const DEFAULT_CONNECT_TIMEOUT_MS = 10_000;
8
+ export const DEFAULT_CACHE_TTL_MS = 60_000;
9
+ export const DEFAULT_STALE_TTL_MS = 300_000;
10
+ export const DEFAULT_HTTP2_MAX_CONCURRENT_STREAMS = 100;
11
+ export const DEFAULT_HTTP1_PIPELINING = 1;
12
+ export const DEFAULT_COMPRESSION_THRESHOLD_BYTES = 1024;
13
+ export const DEFAULT_COMPRESSION_ALGORITHM = 'gzip';
14
+ export const DEFAULT_MAX_PAGES = Infinity;
15
+ export const DEFAULT_PAGE_PARAM = 'page';
16
+ export const DEFAULT_LIMIT_PARAM = 'limit';
17
+ export const DEFAULT_FAILURE_THRESHOLD = 5;
18
+ export const DEFAULT_RESET_TIMEOUT_MS = 60_000;
@@ -0,0 +1,32 @@
1
+ import { z, ZodSchema } from 'zod';
2
+ import { Client } from '../core/client.js';
3
+ import { Method } from '../types/index.js';
4
+ import { HttpError } from '../core/errors.js';
5
+ export interface ContractEndpoint {
6
+ method: Method;
7
+ path: string;
8
+ params?: ZodSchema;
9
+ body?: ZodSchema;
10
+ response?: ZodSchema;
11
+ errors?: Record<number, ZodSchema>;
12
+ }
13
+ export type ContractDefinition = Record<string, ContractEndpoint>;
14
+ type EndpointFunction<T extends ContractEndpoint> = (args: (T['params'] extends ZodSchema ? {
15
+ params: z.infer<T['params']>;
16
+ } : {}) & (T['body'] extends ZodSchema ? {
17
+ body: z.infer<T['body']>;
18
+ } : {}) & {
19
+ headers?: HeadersInit;
20
+ }) => Promise<T['response'] extends ZodSchema ? z.infer<T['response']> : unknown>;
21
+ export type ContractClient<T extends ContractDefinition> = {
22
+ [K in keyof T]: EndpointFunction<T[K]>;
23
+ };
24
+ export declare class ContractError extends Error {
25
+ status: number;
26
+ data: any;
27
+ originalError: HttpError;
28
+ constructor(status: number, data: any, originalError: HttpError);
29
+ }
30
+ export declare function createContract<T extends ContractDefinition>(client: Client, contract: T): ContractClient<T>;
31
+ export {};
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EA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pError } from '../core/errors.js';
2
+ export class ContractError extends Error {
3
+ status;
4
+ data;
5
+ originalError;
6
+ constructor(status, data, originalError) {
7
+ super(`Contract Error ${status}: ${JSON.stringify(data)}`);
8
+ this.status = status;
9
+ this.data = data;
10
+ this.originalError = originalError;
11
+ this.name = 'ContractError';
12
+ }
13
+ }
14
+ export function createContract(client, contract) {
15
+ const proxy = {};
16
+ for (const [key, endpoint] of Object.entries(contract)) {
17
+ proxy[key] = async (args = {}) => {
18
+ let finalParams = args.params;
19
+ if (endpoint.params) {
20
+ finalParams = endpoint.params.parse(args.params);
21
+ }
22
+ let finalBody = args.body;
23
+ if (endpoint.body) {
24
+ finalBody = endpoint.body.parse(args.body);
25
+ }
26
+ const headers = new Headers(args.headers);
27
+ if (finalBody && typeof finalBody === 'object' &&
28
+ !(finalBody instanceof Blob) &&
29
+ !(finalBody instanceof FormData) &&
30
+ !(finalBody instanceof URLSearchParams)) {
31
+ if (!headers.has('Content-Type')) {
32
+ headers.set('Content-Type', 'application/json');
33
+ }
34
+ finalBody = JSON.stringify(finalBody);
35
+ }
36
+ try {
37
+ const request = client.request(endpoint.path, {
38
+ method: endpoint.method,
39
+ params: finalParams,
40
+ body: finalBody,
41
+ headers: headers,
42
+ });
43
+ if (endpoint.response) {
44
+ return await request.parse(endpoint.response);
45
+ }
46
+ return await request.json();
47
+ }
48
+ catch (err) {
49
+ if (endpoint.errors && err instanceof HttpError && err.response) {
50
+ const schema = endpoint.errors[err.status];
51
+ if (schema) {
52
+ try {
53
+ const errorBody = await err.response.json();
54
+ const parsedError = schema.parse(errorBody);
55
+ throw new ContractError(err.status, parsedError, err);
56
+ }
57
+ catch (parseErr) {
58
+ throw err;
59
+ }
60
+ }
61
+ }
62
+ throw err;
63
+ }
64
+ };
65
+ }
66
+ return proxy;
67
+ }
@@ -0,0 +1,107 @@
1
+ import { ClientOptions, Middleware, ReckerRequest, ReckerResponse, RequestOptions, CacheStorage, PageResult } from '../types/index.js';
2
+ import { RequestPromise } from './request-promise.js';
3
+ import { PaginationOptions } from '../plugins/pagination.js';
4
+ import { RetryOptions } from '../plugins/retry.js';
5
+ import { CacheOptions } from '../plugins/cache.js';
6
+ import { DedupOptions } from '../plugins/dedup.js';
7
+ import { ReckerWebSocket, type WebSocketOptions } from '../websocket/client.js';
8
+ import { type WhoisOptions, type WhoisResult } from '../utils/whois.js';
9
+ interface ClientCacheConfig extends Omit<CacheOptions, 'storage'> {
10
+ storage?: CacheStorage;
11
+ driver?: 'memory' | 'file';
12
+ fileStoragePath?: string;
13
+ }
14
+ export interface ExtendedClientOptions extends ClientOptions {
15
+ retry?: RetryOptions;
16
+ cache?: ClientCacheConfig;
17
+ dedup?: DedupOptions;
18
+ }
19
+ export declare class Client {
20
+ private baseUrl;
21
+ private middlewares;
22
+ private hooks;
23
+ private transport;
24
+ private defaultHeaders;
25
+ private defaultParams;
26
+ private paginationConfig?;
27
+ private handler;
28
+ private logger?;
29
+ private debugEnabled;
30
+ private agentManager?;
31
+ private concurrencyConfig;
32
+ private requestPool?;
33
+ constructor(options?: ExtendedClientOptions);
34
+ private createLoggingMiddleware;
35
+ private composeMiddlewares;
36
+ private hooksMiddleware;
37
+ private httpErrorMiddleware;
38
+ use(middleware: Middleware): this;
39
+ beforeRequest(hook: (req: ReckerRequest) => ReckerRequest | void | Promise<ReckerRequest | void>): this;
40
+ afterResponse(hook: (req: ReckerRequest, res: ReckerResponse) => ReckerResponse | void | Promise<ReckerResponse | void>): this;
41
+ onError(hook: (error: Error, req: ReckerRequest) => ReckerResponse | void | Promise<ReckerResponse | void>): this;
42
+ private buildUrl;
43
+ request<T = unknown>(path: string, options?: RequestOptions): RequestPromise<T>;
44
+ get<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
45
+ batch<T = ReckerResponse>(requests: Array<{
46
+ path: string;
47
+ options?: RequestOptions;
48
+ }>, options?: {
49
+ concurrency?: number;
50
+ mapResponse?: (res: ReckerResponse) => Promise<T> | T;
51
+ }): Promise<{
52
+ results: (T | Error)[];
53
+ stats: {
54
+ total: number;
55
+ successful: number;
56
+ failed: number;
57
+ duration: number;
58
+ };
59
+ }>;
60
+ multi<T = ReckerResponse>(requests: Array<{
61
+ path: string;
62
+ options?: RequestOptions;
63
+ }>, options?: {
64
+ concurrency?: number;
65
+ mapResponse?: (res: ReckerResponse) => Promise<T> | T;
66
+ }): Promise<{
67
+ results: (Error | T)[];
68
+ stats: {
69
+ total: number;
70
+ successful: number;
71
+ failed: number;
72
+ duration: number;
73
+ };
74
+ }>;
75
+ private requestWithBody;
76
+ post<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
77
+ put<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
78
+ patch<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
79
+ delete<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
80
+ head<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
81
+ options<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
82
+ trace<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
83
+ connect<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
84
+ purge<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
85
+ propfind<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
86
+ proppatch<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
87
+ mkcol<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
88
+ copy<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
89
+ move<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
90
+ lock<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
91
+ unlock<T = unknown>(path: string, options?: Omit<RequestOptions, 'method'>): RequestPromise<T>;
92
+ link<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
93
+ unlink<T = unknown>(path: string, body?: any, options?: Omit<RequestOptions, 'method' | 'body'>): RequestPromise<T>;
94
+ paginate<T>(path: string, options?: RequestOptions & PaginationOptions<T>): AsyncGenerator<T>;
95
+ pages<T = any>(path: string, options?: RequestOptions & PaginationOptions): AsyncGenerator<PageResult<T>>;
96
+ page<T = any>(path: string, pageNumber: number, options?: RequestOptions & {
97
+ pageParam?: string;
98
+ }): RequestPromise<T>;
99
+ getAll<T>(path: string, options?: RequestOptions & PaginationOptions<T>): Promise<T[]>;
100
+ websocket(path: string, options?: WebSocketOptions): ReckerWebSocket;
101
+ ws(path: string, options?: WebSocketOptions): ReckerWebSocket;
102
+ whois(query: string, options?: WhoisOptions): Promise<WhoisResult>;
103
+ isDomainAvailable(domain: string, options?: WhoisOptions): Promise<boolean>;
104
+ }
105
+ export declare function createClient(options?: ExtendedClientOptions): Client;
106
+ export {};
107
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAgB,aAAa,EAAE,cAAc,EAAE,cAAc,EAAa,YAAY,EAAyC,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIvM,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAUtD,OAAO,EAAY,iBAAiB,EAAe,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAS,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAS,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAS,YAAY,EAA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