rdapify 0.1.0 → 0.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.
Files changed (183) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/README.md +268 -69
  3. package/dist/application/client/RDAPClient.d.ts +32 -0
  4. package/dist/application/client/RDAPClient.d.ts.map +1 -0
  5. package/dist/application/client/RDAPClient.js +109 -0
  6. package/dist/application/client/RDAPClient.js.map +1 -0
  7. package/dist/application/client/index.d.ts +2 -0
  8. package/dist/application/client/index.d.ts.map +1 -0
  9. package/dist/application/client/index.js +6 -0
  10. package/dist/application/client/index.js.map +1 -0
  11. package/dist/application/services/QueryOrchestrator.d.ts +23 -0
  12. package/dist/application/services/QueryOrchestrator.d.ts.map +1 -0
  13. package/dist/application/services/QueryOrchestrator.js +59 -0
  14. package/dist/application/services/QueryOrchestrator.js.map +1 -0
  15. package/dist/application/services/index.d.ts +2 -0
  16. package/dist/application/services/index.d.ts.map +1 -0
  17. package/dist/application/services/index.js +6 -0
  18. package/dist/application/services/index.js.map +1 -0
  19. package/dist/core/ports/bootstrap.port.d.ts +8 -0
  20. package/dist/core/ports/bootstrap.port.d.ts.map +1 -0
  21. package/dist/core/ports/bootstrap.port.js +3 -0
  22. package/dist/core/ports/bootstrap.port.js.map +1 -0
  23. package/dist/core/ports/cache.port.d.ts +10 -0
  24. package/dist/core/ports/cache.port.d.ts.map +1 -0
  25. package/dist/core/ports/cache.port.js +3 -0
  26. package/dist/core/ports/cache.port.js.map +1 -0
  27. package/dist/core/ports/fetcher.port.d.ts +5 -0
  28. package/dist/core/ports/fetcher.port.d.ts.map +1 -0
  29. package/dist/core/ports/fetcher.port.js +3 -0
  30. package/dist/core/ports/fetcher.port.js.map +1 -0
  31. package/dist/core/ports/index.d.ts +6 -0
  32. package/dist/core/ports/index.d.ts.map +1 -0
  33. package/dist/core/ports/index.js +9 -0
  34. package/dist/core/ports/index.js.map +1 -0
  35. package/dist/core/ports/normalizer.port.d.ts +5 -0
  36. package/dist/core/ports/normalizer.port.d.ts.map +1 -0
  37. package/dist/core/ports/normalizer.port.js +3 -0
  38. package/dist/core/ports/normalizer.port.js.map +1 -0
  39. package/dist/core/ports/pii-redactor.port.d.ts +6 -0
  40. package/dist/core/ports/pii-redactor.port.d.ts.map +1 -0
  41. package/dist/core/ports/pii-redactor.port.js +3 -0
  42. package/dist/core/ports/pii-redactor.port.js.map +1 -0
  43. package/dist/index.d.ts +10 -7
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +35 -16
  46. package/dist/index.js.map +1 -0
  47. package/dist/infrastructure/cache/CacheManager.d.ts +28 -0
  48. package/dist/infrastructure/cache/CacheManager.d.ts.map +1 -0
  49. package/dist/infrastructure/cache/CacheManager.js +117 -0
  50. package/dist/infrastructure/cache/CacheManager.js.map +1 -0
  51. package/dist/infrastructure/cache/InMemoryCache.d.ts +24 -0
  52. package/dist/infrastructure/cache/InMemoryCache.d.ts.map +1 -0
  53. package/dist/infrastructure/cache/InMemoryCache.js +96 -0
  54. package/dist/infrastructure/cache/InMemoryCache.js.map +1 -0
  55. package/dist/infrastructure/cache/index.d.ts +3 -0
  56. package/dist/infrastructure/cache/index.d.ts.map +1 -0
  57. package/dist/infrastructure/cache/index.js +8 -0
  58. package/dist/infrastructure/cache/index.js.map +1 -0
  59. package/dist/infrastructure/http/BootstrapDiscovery.d.ts +21 -0
  60. package/dist/infrastructure/http/BootstrapDiscovery.d.ts.map +1 -0
  61. package/dist/infrastructure/http/BootstrapDiscovery.js +130 -0
  62. package/dist/infrastructure/http/BootstrapDiscovery.js.map +1 -0
  63. package/dist/infrastructure/http/Fetcher.d.ts +29 -0
  64. package/dist/infrastructure/http/Fetcher.d.ts.map +1 -0
  65. package/dist/infrastructure/http/Fetcher.js +114 -0
  66. package/dist/infrastructure/http/Fetcher.js.map +1 -0
  67. package/dist/infrastructure/http/Normalizer.d.ts +11 -0
  68. package/dist/infrastructure/http/Normalizer.d.ts.map +1 -0
  69. package/dist/infrastructure/http/Normalizer.js +151 -0
  70. package/dist/infrastructure/http/Normalizer.js.map +1 -0
  71. package/dist/infrastructure/http/index.d.ts +4 -0
  72. package/dist/infrastructure/http/index.d.ts.map +1 -0
  73. package/dist/infrastructure/http/index.js +10 -0
  74. package/dist/infrastructure/http/index.js.map +1 -0
  75. package/dist/infrastructure/security/PIIRedactor.d.ts +13 -0
  76. package/dist/infrastructure/security/PIIRedactor.d.ts.map +1 -0
  77. package/dist/infrastructure/security/PIIRedactor.js +83 -0
  78. package/dist/infrastructure/security/PIIRedactor.js.map +1 -0
  79. package/dist/infrastructure/security/SSRFProtection.d.ts +13 -0
  80. package/dist/infrastructure/security/SSRFProtection.d.ts.map +1 -0
  81. package/dist/infrastructure/security/SSRFProtection.js +142 -0
  82. package/dist/infrastructure/security/SSRFProtection.js.map +1 -0
  83. package/dist/infrastructure/security/index.d.ts +3 -0
  84. package/dist/infrastructure/security/index.d.ts.map +1 -0
  85. package/dist/infrastructure/security/index.js +8 -0
  86. package/dist/infrastructure/security/index.js.map +1 -0
  87. package/dist/shared/constants/http.constants.d.ts +26 -0
  88. package/dist/shared/constants/http.constants.d.ts.map +1 -0
  89. package/dist/shared/constants/http.constants.js +29 -0
  90. package/dist/shared/constants/http.constants.js.map +1 -0
  91. package/dist/shared/constants/index.d.ts +3 -0
  92. package/dist/shared/constants/index.d.ts.map +1 -0
  93. package/dist/shared/constants/index.js +6 -0
  94. package/dist/shared/constants/index.js.map +1 -0
  95. package/dist/shared/constants/rdap.constants.d.ts +9 -0
  96. package/dist/shared/constants/rdap.constants.d.ts.map +1 -0
  97. package/dist/shared/constants/rdap.constants.js +21 -0
  98. package/dist/shared/constants/rdap.constants.js.map +1 -0
  99. package/dist/shared/errors/base.error.d.ts +39 -0
  100. package/dist/shared/errors/base.error.d.ts.map +1 -0
  101. package/dist/shared/errors/base.error.js +91 -0
  102. package/dist/shared/errors/base.error.js.map +1 -0
  103. package/dist/shared/errors/index.d.ts +2 -0
  104. package/dist/shared/errors/index.d.ts.map +1 -0
  105. package/dist/shared/errors/index.js +5 -0
  106. package/dist/shared/errors/index.js.map +1 -0
  107. package/dist/shared/types/entities.d.ts +50 -0
  108. package/dist/shared/types/entities.d.ts.map +1 -0
  109. package/dist/shared/types/entities.js +3 -0
  110. package/dist/shared/types/entities.js.map +1 -0
  111. package/dist/shared/types/enums.d.ts +10 -0
  112. package/dist/shared/types/enums.d.ts.map +1 -0
  113. package/dist/shared/types/enums.js +3 -0
  114. package/dist/shared/types/enums.js.map +1 -0
  115. package/dist/shared/types/errors.d.ts +40 -0
  116. package/dist/shared/types/errors.d.ts.map +1 -0
  117. package/dist/shared/types/errors.js +101 -0
  118. package/dist/shared/types/errors.js.map +1 -0
  119. package/dist/shared/types/index.d.ts +4 -0
  120. package/dist/shared/types/index.d.ts.map +1 -0
  121. package/dist/shared/types/index.js +3 -0
  122. package/dist/shared/types/index.js.map +1 -0
  123. package/dist/shared/types/options.d.ts +60 -0
  124. package/dist/shared/types/options.d.ts.map +1 -0
  125. package/dist/shared/types/options.js +50 -0
  126. package/dist/shared/types/options.js.map +1 -0
  127. package/dist/shared/types/responses.d.ts +76 -0
  128. package/dist/shared/types/responses.d.ts.map +1 -0
  129. package/dist/shared/types/responses.js +3 -0
  130. package/dist/shared/types/responses.js.map +1 -0
  131. package/dist/shared/utils/helpers/async.d.ts +9 -0
  132. package/dist/shared/utils/helpers/async.d.ts.map +1 -0
  133. package/dist/shared/utils/helpers/async.js +47 -0
  134. package/dist/shared/utils/helpers/async.js.map +1 -0
  135. package/dist/shared/utils/helpers/cache.d.ts +2 -0
  136. package/dist/shared/utils/helpers/cache.d.ts.map +1 -0
  137. package/dist/shared/utils/helpers/cache.js +7 -0
  138. package/dist/shared/utils/helpers/cache.js.map +1 -0
  139. package/dist/shared/utils/helpers/format.d.ts +3 -0
  140. package/dist/shared/utils/helpers/format.d.ts.map +1 -0
  141. package/dist/shared/utils/helpers/format.js +22 -0
  142. package/dist/shared/utils/helpers/format.js.map +1 -0
  143. package/dist/shared/utils/helpers/http.d.ts +2 -0
  144. package/dist/shared/utils/helpers/http.d.ts.map +1 -0
  145. package/dist/shared/utils/helpers/http.js +17 -0
  146. package/dist/shared/utils/helpers/http.js.map +1 -0
  147. package/dist/shared/utils/helpers/index.d.ts +8 -0
  148. package/dist/shared/utils/helpers/index.d.ts.map +1 -0
  149. package/dist/shared/utils/helpers/index.js +29 -0
  150. package/dist/shared/utils/helpers/index.js.map +1 -0
  151. package/dist/shared/utils/helpers/object.d.ts +3 -0
  152. package/dist/shared/utils/helpers/object.d.ts.map +1 -0
  153. package/dist/shared/utils/helpers/object.js +24 -0
  154. package/dist/shared/utils/helpers/object.js.map +1 -0
  155. package/dist/shared/utils/helpers/runtime.d.ts +6 -0
  156. package/dist/shared/utils/helpers/runtime.d.ts.map +1 -0
  157. package/dist/shared/utils/helpers/runtime.js +33 -0
  158. package/dist/shared/utils/helpers/runtime.js.map +1 -0
  159. package/dist/shared/utils/helpers/string.d.ts +4 -0
  160. package/dist/shared/utils/helpers/string.d.ts.map +1 -0
  161. package/dist/shared/utils/helpers/string.js +29 -0
  162. package/dist/shared/utils/helpers/string.js.map +1 -0
  163. package/dist/shared/utils/validators/asn.d.ts +3 -0
  164. package/dist/shared/utils/validators/asn.d.ts.map +1 -0
  165. package/dist/shared/utils/validators/asn.js +30 -0
  166. package/dist/shared/utils/validators/asn.js.map +1 -0
  167. package/dist/shared/utils/validators/domain.d.ts +3 -0
  168. package/dist/shared/utils/validators/domain.d.ts.map +1 -0
  169. package/dist/shared/utils/validators/domain.js +34 -0
  170. package/dist/shared/utils/validators/domain.js.map +1 -0
  171. package/dist/shared/utils/validators/index.d.ts +5 -0
  172. package/dist/shared/utils/validators/index.d.ts.map +1 -0
  173. package/dist/shared/utils/validators/index.js +19 -0
  174. package/dist/shared/utils/validators/index.js.map +1 -0
  175. package/dist/shared/utils/validators/ip.d.ts +5 -0
  176. package/dist/shared/utils/validators/ip.d.ts.map +1 -0
  177. package/dist/shared/utils/validators/ip.js +55 -0
  178. package/dist/shared/utils/validators/ip.js.map +1 -0
  179. package/dist/shared/utils/validators/network.d.ts +4 -0
  180. package/dist/shared/utils/validators/network.d.ts.map +1 -0
  181. package/dist/shared/utils/validators/network.js +48 -0
  182. package/dist/shared/utils/validators/network.js.map +1 -0
  183. package/package.json +91 -20
package/CHANGELOG.md ADDED
@@ -0,0 +1,150 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2025-01-25
11
+
12
+ ### Added
13
+ - Initial public release of RDAPify
14
+ - Core RDAP client with domain, IP, and ASN query support
15
+ - Automatic RDAP server discovery via IANA Bootstrap
16
+ - SSRF protection with proper CIDR matching for IPv4 and IPv6
17
+ - PII redaction for GDPR/CCPA compliance
18
+ - In-memory caching with configurable TTL
19
+ - Data normalization for consistent response format
20
+ - Comprehensive TypeScript types and interfaces
21
+ - Input validation for domains, IPs, and ASNs
22
+ - Retry logic with configurable backoff strategies
23
+ - Interactive playground for testing RDAP queries
24
+ - Playground API proxy server with Express
25
+ - Comprehensive community health files (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SUPPORT.md)
26
+ - Issue templates (bug report, feature request, question)
27
+ - Pull request template with comprehensive checklist
28
+ - Funding configuration for GitHub Sponsors and Open Collective
29
+ - Organization profile with professional presentation
30
+
31
+ ### Infrastructure
32
+ - CI/CD workflows for Node.js 16, 18, and 20
33
+ - CodeQL security analysis (weekly scans)
34
+ - Dependabot for automated dependency updates
35
+ - Dependency review for pull requests
36
+ - Automated testing and linting
37
+ - GitHub Actions for release automation
38
+
39
+ ### Security
40
+ - SSRF protection blocks private IPs, localhost, and internal domains
41
+ - Certificate validation enforced (HTTPS only)
42
+ - Proper CIDR matching using ipaddr.js library
43
+ - Input validation prevents injection attacks
44
+ - Automated security scanning with CodeQL
45
+ - Secret scanning configuration
46
+ - Dependabot security updates
47
+
48
+ ### Documentation
49
+ - Comprehensive README with examples
50
+ - API documentation
51
+ - Security policy
52
+ - Contributing guidelines
53
+ - Code of conduct
54
+ - Support resources
55
+
56
+ ### Testing
57
+ - 146+ unit and integration tests
58
+ - Mocked fixtures for reliable testing
59
+ - Coverage reporting
60
+
61
+ ## [0.1.0-alpha.4] - 2025-01-25
62
+
63
+ ### Added
64
+ - Dependabot configuration for automated dependency updates
65
+ - Enhanced CI/CD workflows with multi-version Node.js testing (Node.js 16, 18, 20)
66
+ - CodeQL security analysis workflow (weekly scans)
67
+ - Dependency review workflow for pull requests
68
+ - Interactive playground for testing RDAP queries
69
+ - Playground API proxy server with Express
70
+ - Comprehensive community health files (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SUPPORT.md)
71
+ - Issue templates (bug report, feature request, question)
72
+ - Pull request template with comprehensive checklist
73
+ - Funding configuration for GitHub Sponsors and Open Collective
74
+ - Organization profile with professional presentation
75
+
76
+ ### Changed
77
+ - Improved CI workflow to test on multiple Node.js versions
78
+ - Simplified CodeQL configuration
79
+ - Updated organization profile with professional presentation
80
+ - Enhanced documentation structure
81
+ - Improved .gitignore to exclude .kiro directory
82
+
83
+ ### Security
84
+ - Added automated security scanning with CodeQL
85
+ - Enabled dependency review for pull requests
86
+ - Configured Dependabot for security updates
87
+ - Set up weekly security scans
88
+
89
+ ### Infrastructure
90
+ - Added CI/CD workflows for automated testing
91
+ - Configured Dependabot for dependency management
92
+ - Set up CodeQL for security analysis
93
+
94
+ ## [0.1.0-alpha.2] - 2026-01-22
95
+
96
+ ### Fixed
97
+ - Cancel timeout timer in `withTimeout()` to prevent Jest exit warning
98
+ - Improve integration test fetch mock cleanup with proper `beforeEach`/`afterEach`
99
+
100
+ ## [0.1.0-alpha.1] - 2026-01-22
101
+
102
+ ### Added
103
+ - Initial alpha release of RDAPify
104
+ - Core RDAP client with domain, IP, and ASN query support
105
+ - Automatic RDAP server discovery via IANA Bootstrap
106
+ - SSRF protection with proper CIDR matching for IPv4 and IPv6
107
+ - PII redaction for GDPR/CCPA compliance
108
+ - In-memory caching with configurable TTL
109
+ - Data normalization for consistent response format
110
+ - Comprehensive TypeScript types and interfaces
111
+ - Input validation for domains, IPs, and ASNs
112
+ - Retry logic with configurable backoff strategies
113
+ - 146 unit and integration tests with mocked fixtures
114
+
115
+ ### Security
116
+ - SSRF protection blocks private IPs, localhost, and internal domains
117
+ - Certificate validation enforced (HTTPS only)
118
+ - Proper CIDR matching using ipaddr.js library
119
+ - Input validation prevents injection attacks
120
+
121
+ ### Known Limitations
122
+ - Redis cache not yet implemented (in-memory only)
123
+ - No CLI tool in this release
124
+ - Bun/Deno/Cloudflare Workers support untested
125
+ - Live integration tests not included in CI
126
+ - Documentation references features not yet available
127
+
128
+ ### Dependencies
129
+ - ipaddr.js: ^2.2.0 (for CIDR matching)
130
+ - tslib: ^2.8.1 (TypeScript runtime)
131
+
132
+ ### Development
133
+ - TypeScript 5.3.3 with strict mode
134
+ - Jest for testing
135
+ - ESLint for code quality
136
+ - Prettier for code formatting
137
+
138
+ ## [Unreleased]
139
+
140
+ ### Planned for v0.2.0
141
+ - Redis cache implementation
142
+ - CLI tool for quick queries
143
+ - Live integration tests
144
+ - Improved error messages
145
+ - Performance benchmarks
146
+ - Additional runtime support (Bun, Deno)
147
+
148
+ ---
149
+
150
+ [0.1.0-alpha.1]: https://github.com/rdapify/rdapify/releases/tag/v0.1.0-alpha.1
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # RDAPify - Unified, Secure, High-Performance RDAP Client for Enterprise Applications
2
2
 
3
+ > **🎉 STABLE RELEASE**: This is v0.1.0 — the first stable public release with production-ready core functionality. See [What's Ready](#-whats-ready-in-v010) below.
4
+
3
5
  [![npm version](https://img.shields.io/npm/v/rdapify?style=flat-square)](https://www.npmjs.com/package/rdapify)
4
6
  [![License](https://img.shields.io/npm/l/rdapify?style=flat-square)](LICENSE)
5
- [![Build Status](https://img.shields.io/github/actions/workflow/status/rdapify/rdapify/ci.yml?branch=main&style=flat-square)](https://github.com/rdapify/rdapify/actions)
6
- [![Coverage](https://img.shields.io/codecov/c/github/rdapify/rdapify?style=flat-square)](https://codecov.io/gh/rdapify/rdapify)
7
- [![Security](https://img.shields.io/badge/security-SSRF%20Protected-brightgreen?style=flat-square)](SECURITY.md)
7
+ [![Security](https://img.shields.io/badge/security-SSRF%20Protected-brightgreen?style=flat-square)](SECURITY.md)
8
+ [![Website](https://img.shields.io/badge/website-rdapify.com-blue?style=flat-square)](https://rdapify.com)
9
+ [![GitHub](https://img.shields.io/github/stars/rdapify/RDAPify?style=flat-square)](https://github.com/rdapify/RDAPify)
8
10
 
9
11
  **RDAPify** unifies RDAP queries across all global registries (Verisign, ARIN, RIPE, APNIC, LACNIC) with robust security protection, exceptional performance, and an integrated developer experience. This isn't just another RDAP client — it's a complete platform for processing registration data securely.
10
12
 
@@ -23,10 +25,11 @@ Direct RDAP queries are complex — each registry uses different formats, rate l
23
25
  ```
24
26
 
25
27
  RDAPify intelligently addresses these challenges:
28
+
26
29
  - ✅ **Data Normalization**: Consistent response regardless of source registry
27
30
  - ✅ **SSRF Protection**: Prevent attacks on internal infrastructure
28
31
  - ✅ **Exceptional Performance**: Smart caching, parallel processing, memory optimization
29
- - ✅ **Broad Compatibility**: Works on Node.js, Bun, Deno, Cloudflare Workers
32
+ - ✅ **Node.js Compatibility**: Verified working on Node.js (target: 16+; Bun, Deno, Cloudflare Workers: untested)
30
33
  - ✅ **GDPR-ready**: Built-in tools for automatically redacting personal data
31
34
 
32
35
  ## 📦 Quick Installation
@@ -40,25 +43,23 @@ yarn add rdapify
40
43
 
41
44
  # Using pnpm
42
45
  pnpm add rdapify
46
+ ```
43
47
 
44
- # Using Bun
48
+ **Experimental (untested):**
49
+ ```bash
50
+ # Using Bun (untested)
45
51
  bun add rdapify
46
52
  ```
47
53
 
48
54
  ## ⚡ Get Started in 30 Seconds
49
55
 
56
+ ### Basic Usage
57
+
50
58
  ```typescript
51
59
  import { RDAPClient } from 'rdapify';
52
60
 
53
- // Create a secure client with optimized defaults
54
- const client = new RDAPClient({
55
- cache: true, // Automatic caching (1 hour TTL)
56
- redactPII: true, // Automatically redact personal information
57
- retry: { // Smart retries for transient failures
58
- maxAttempts: 3,
59
- backoff: 'exponential'
60
- }
61
- });
61
+ // Create a client with default settings
62
+ const client = new RDAPClient();
62
63
 
63
64
  // Query a domain
64
65
  const result = await client.domain('example.com');
@@ -68,12 +69,35 @@ console.log({
68
69
  registrar: result.registrar?.name,
69
70
  status: result.status,
70
71
  nameservers: result.nameservers,
71
- created: result.events.find(e => e.type === 'created')?.date,
72
- expires: result.events.find(e => e.type === 'expiration')?.date
72
+ created: result.events.find((e) => e.type === 'created')?.date,
73
+ expires: result.events.find((e) => e.type === 'expiration')?.date,
74
+ });
75
+ ```
76
+
77
+ ### With Security & Performance Options
78
+
79
+ ```typescript
80
+ import { RDAPClient } from 'rdapify';
81
+
82
+ // Create a secure client with optimized defaults
83
+ const client = new RDAPClient({
84
+ cache: true, // Automatic caching (1 hour TTL)
85
+ redactPII: true, // Automatically redact personal information
86
+ retry: {
87
+ // Smart retries for transient failures
88
+ maxAttempts: 3,
89
+ backoff: 'exponential',
90
+ },
73
91
  });
92
+
93
+ // Query domain, IP, or ASN
94
+ const domain = await client.domain('example.com');
95
+ const ip = await client.ip('8.8.8.8');
96
+ const asn = await client.asn('AS15169');
74
97
  ```
75
98
 
76
- **Output:**
99
+ **Example Output:**
100
+
77
101
  ```json
78
102
  {
79
103
  "domain": "example.com",
@@ -88,6 +112,7 @@ console.log({
88
112
  ## 🌟 Core Features
89
113
 
90
114
  ### 🔒 Enterprise Security
115
+
91
116
  - **Built-in SSRF Protection**: Prevent queries to internal IP addresses or dangerous domains
92
117
  - **Certificate Validation**: Reject insecure connections to RDAP servers
93
118
  - **Rate Limiting**: Prevent service blocking due to excessive requests
@@ -95,20 +120,25 @@ console.log({
95
120
  - **Full Audit Trail**: Track all critical operations for compliance purposes
96
121
 
97
122
  ### ⚡ Exceptional Performance
98
- - **Advanced Caching**: Supports In-memory, Redis, and geo-distributed caching
99
- - **Parallel Processing**: Handle 1000+ domains in seconds
123
+
124
+ - **Smart Caching**: In-memory LRU cache with configurable TTL (Redis support planned)
125
+ - **Batch Processing**: Process multiple queries efficiently
100
126
  - **Registry Discovery**: Automatic IANA Bootstrap for finding the correct registry
101
- - **Offline Mode**: Work with cached data during network outages
102
- - **Priority Queues**: Ensure critical requests are processed first
127
+ - **Offline Mode**: Work with cached data during network outages (planned)
128
+ - **Optimized Parsing**: Fast JSONPath-based normalization
103
129
 
104
130
  ### 🧩 Seamless Integration
131
+
105
132
  - **Full TypeScript Support**: Strongly typed with embedded documentation
106
- - **Multi-environment Support**: Works on Node.js (16+), Bun, Deno, Cloudflare Workers
107
- - **Interactive CLI**: For quick queries and testing
108
- - **Web Playground**: Try the library directly in your browser
109
- - **Pre-built Templates**: For AWS Lambda, Azure Functions, Kubernetes, and more
133
+ - **Node.js Support**: Verified working (target: Node.js 16+; other runtimes untested)
134
+ - **Interactive CLI**: For quick queries and testing (planned)
135
+ - **Web Playground**: Try the library directly in your browser (planned)
136
+ - **Pre-built Templates**: For AWS Lambda, Azure Functions, Kubernetes, and more (planned)
137
+
138
+ ### 📊 Advanced Analytics (Planned)
139
+
140
+ Future releases will include:
110
141
 
111
- ### 📊 Advanced Analytics
112
142
  - **Customizable Dashboards**: Track critical domains and assets
113
143
  - **Automated Reports**: Schedule expiration alerts and important changes
114
144
  - **Pattern Detection**: Identify suspicious registration behaviors or potential attacks
@@ -136,60 +166,62 @@ style G fill:#2196F3,stroke:#0D47A1
136
166
 
137
167
  We don't treat security as an add-on feature — it's fundamental to our design. RDAPify protects your applications from:
138
168
 
139
- | Threat | Protection Mechanism | Criticality |
140
- |--------|----------------------|-------------|
141
- | SSRF | Domain validation, blocking internal IPs | 🔴 Critical |
142
- | DoS | Rate limiting, timeouts | 🟠 Important |
143
- | Data Leaks | PII redaction, no raw response storage | 🔴 Critical |
144
- | MitM | Mandatory HTTPS, certificate validation | 🟠 Important |
145
- | Data Injection | Schema validation, strict parsing | 🟠 Important |
169
+ | Threat | Protection Mechanism | Criticality |
170
+ | -------------- | ---------------------------------------- | ------------ |
171
+ | SSRF | Domain validation, blocking internal IPs | 🔴 Critical |
172
+ | DoS | Rate limiting, timeouts | 🟠 Important |
173
+ | Data Leaks | PII redaction, no raw response storage | 🔴 Critical |
174
+ | MitM | Mandatory HTTPS, certificate validation | 🟠 Important |
175
+ | Data Injection | Schema validation, strict parsing | 🟠 Important |
146
176
 
147
177
  Read our [Security Whitepaper](security/whitepaper.md) for deeper technical details and advanced scenarios.
148
178
 
149
- ## 📚 Comprehensive Documentation
179
+ ## 📚 Documentation
150
180
 
151
- RDAPify provides enterprise-grade documentation covering every scenario:
181
+ RDAPify provides comprehensive documentation in the repository:
152
182
 
153
- - **[Getting Started](docs/getting-started/)** - Start in 5 minutes
154
- - **[Playground](docs/playground/)** - Try the library in your browser
155
- - **[API Reference](docs/api-reference/)** - Complete TypeScript documentation
156
- - **[Security & Privacy](docs/security/)** - Enterprise security guide
157
- - **[Integrations](docs/integrations/)** - Pre-built cloud platform templates
158
- - **[Enterprise Guide](docs/enterprise/)** - Production best practices
159
- - **[Analytics](docs/analytics/)** - Dashboard and reporting recipes
183
+ - **[Getting Started](docs/getting_started/)** - Installation, quick start, and first query
184
+ - **[API Reference](docs/api_reference/)** - Complete TypeScript API documentation
185
+ - **[Core Concepts](docs/core_concepts/)** - RDAP fundamentals, architecture, and normalization
186
+ - **[Security Guide](docs/security/)** - SSRF protection, PII redaction, and best practices
187
+ - **[Guides](docs/guides/)** - Error handling, caching strategies, and performance optimization
188
+ - **[Examples](examples/)** - Real-world code examples and use cases
160
189
 
161
- [→ View Full Documentation](https://rdapify.dev)
190
+ > **Note**: Full documentation site is planned for future release. For now, browse the [docs/](docs/) directory in the repository.
162
191
 
163
192
  ## 🌐 Interactive Playground
164
193
 
165
- No installation needed! Try RDAPify instantly in our [Playground](https://playground.rdapify.dev):
166
-
167
- ![Screenshot of RDAPify Playground](https://rdapify.dev/images/playground-screenshot.png)
194
+ > **Coming Soon**: Interactive playground is planned for a future release. For now, install the package and try the examples in the [docs/](docs/) directory.
168
195
 
169
196
  ## 📊 Performance Benchmarks
170
197
 
171
- ### Comparison with Alternatives (1000 queries)
172
- | Library | Time (seconds) | Memory Usage | Avg Response Time |
173
- |---------|----------------|--------------|-------------------|
174
- | **RDAPify** | **3.2** | **85 MB** | **1.8 ms** |
175
- | rdap-client | 42.7 | 310 MB | 214 ms |
176
- | node-rdap | 58.1 | 420 MB | 290 ms |
177
- | whois-json | 196.5 | 580 MB | 982 ms |
178
-
179
- > Benchmarks run on Node.js 20, Intel i7, 32GB RAM, 1Gbps connection. Includes caching benefits.
198
+ > **Coming Soon**: Comprehensive benchmarks with real-world data will be published in future releases. Current alpha focuses on correctness and security over performance optimization.
180
199
 
181
200
  ## 👥 Community & Support
182
201
 
183
- RDAPify is an open source project supported by organizations and developers worldwide:
202
+ RDAPify is an open source project. Get help or contribute:
203
+
204
+ ### 🐛 Bug Reports & Feature Requests
205
+ - **[GitHub Issues](https://github.com/rdapify/RDAPify/issues)** - Report bugs or request features
184
206
 
185
- - **[Matrix/Element](https://matrix.to/#/#rdapify:matrix.org)** - Live chat with developers
186
- - **[GitHub Discussions](https://github.com/rdapify/rdapify/discussions)** - Questions and ideas
187
- - **[Weekly Office Hours](https://rdapify.dev/community/office-hours)** - Live sessions every Thursday
188
- - **[Enterprise Support](https://rdapify.dev/enterprise)** - SLA-backed support for businesses
207
+ ### 💬 Questions & Discussions
208
+ - **[GitHub Discussions](https://github.com/rdapify/RDAPify/discussions)** - Ask questions, share ideas, and show what you've built
209
+
210
+ ### 📧 Direct Contact
211
+ - **General inquiries**: contact@rdapify.com
212
+ - **Security issues**: security@rdapify.com (see [SECURITY.md](SECURITY.md))
213
+ - **Support**: support@rdapify.com
214
+
215
+ ### 🤝 Contributing
216
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
217
+ - **[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)** - Community standards
218
+
219
+ > **Enterprise Support**: For SLA-backed support, consulting, or custom features, contact enterprise@rdapify.com
189
220
 
190
221
  ## 🤝 Contributing
191
222
 
192
223
  We welcome contributions! Whether you're a:
224
+
193
225
  - Developer wanting to fix bugs or add features
194
226
  - Writer improving documentation
195
227
  - Tester reporting issues
@@ -197,16 +229,183 @@ We welcome contributions! Whether you're a:
197
229
 
198
230
  Start by reading our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
199
231
 
200
- ## 🏢 Enterprise Adoption
232
+ ## 🚧 Project Status
233
+
234
+ **Current Release**: v0.1.0 (Stable)
235
+
236
+ ### ✅ What's Ready in v0.1.0
237
+
238
+ Core functionality is production-ready and fully tested:
239
+
240
+ - ✅ **RDAP Client**: Domain, IP, and ASN queries with automatic bootstrap discovery
241
+ - ✅ **SSRF Protection**: Blocks private IPs, localhost, link-local, with proper CIDR matching (IPv4/IPv6)
242
+ - ✅ **Data Normalization**: Consistent response format across all registries
243
+ - ✅ **PII Redaction**: Automatic redaction of emails, phones, addresses
244
+ - ✅ **In-Memory Caching**: LRU cache with TTL support
245
+ - ✅ **Error Handling**: Structured errors with retry logic (exponential backoff)
246
+ - ✅ **TypeScript Support**: Full type definitions and strict mode
247
+ - ✅ **Test Coverage**: 146 tests passing (unit + integration with mocked fixtures)
248
+ - ✅ **Node.js Support**: Verified working (CommonJS + ESM imports functional)
249
+
250
+ ### 🔄 Planned Features
251
+
252
+ These features are planned for future releases:
253
+
254
+ - ⏳ **Redis/External Cache**: External cache adapters coming in v0.2.0
255
+ - ⏳ **CLI Tool**: Command-line interface planned
256
+ - ⏳ **Interactive Playground**: Web-based testing environment
257
+ - ⏳ **Bun/Deno/Cloudflare Workers**: Additional runtime support
258
+ - ⏳ **Advanced Analytics**: Dashboard and reporting features
259
+ - ⏳ **Geo-distributed Caching**: Multi-region cache support
260
+
261
+ ### 📋 Roadmap to v0.2.0
262
+
263
+ - Redis cache adapter
264
+ - CLI tool
265
+ - Rate limiting improvements
266
+ - Batch processing optimization
267
+
268
+ See [ROADMAP.md](ROADMAP.md) for the complete roadmap.
269
+
270
+ ## 🏗️ Code Architecture
271
+
272
+ RDAPify follows a clean, modular architecture with clear separation of concerns:
273
+
274
+ ### Source Structure (`/src`)
275
+
276
+ ```
277
+ src/
278
+ ├── client/ # Client orchestration layer
279
+ │ ├── RDAPClient.ts # Main client (242 LOC)
280
+ │ └── QueryOrchestrator.ts # Query pattern extraction (169 LOC)
281
+
282
+ ├── fetcher/ # HTTP and registry discovery
283
+ │ ├── Fetcher.ts # HTTP client (196 LOC)
284
+ │ ├── BootstrapDiscovery.ts # IANA bootstrap (224 LOC)
285
+ │ └── SSRFProtection.ts # Security validation (219 LOC)
286
+
287
+ ├── normalizer/ # Data transformation
288
+ │ ├── Normalizer.ts # Response normalization (239 LOC)
289
+ │ └── PIIRedactor.ts # Privacy protection (140 LOC)
290
+
291
+ ├── cache/ # Caching layer
292
+ │ ├── CacheManager.ts # Cache orchestration (188 LOC)
293
+ │ └── InMemoryCache.ts # LRU implementation (185 LOC)
294
+
295
+ ├── types/ # TypeScript definitions
296
+ │ ├── enums.ts # Type aliases (87 LOC)
297
+ │ ├── entities.ts # Entity interfaces (74 LOC)
298
+ │ ├── responses.ts # Response types (100 LOC)
299
+ │ ├── errors.ts # Error classes (154 LOC)
300
+ │ ├── options.ts # Configuration types (201 LOC)
301
+ │ └── index.ts # Barrel export (36 LOC)
302
+
303
+ └── utils/ # Utilities
304
+ ├── validators/ # Input validation
305
+ │ ├── domain.ts # Domain validation (55 LOC)
306
+ │ ├── ip.ts # IP validation (86 LOC)
307
+ │ ├── asn.ts # ASN validation (42 LOC)
308
+ │ └── network.ts # Network utilities (76 LOC)
309
+
310
+ └── helpers/ # Helper functions
311
+ ├── async.ts # Async utilities (77 LOC)
312
+ ├── string.ts # String manipulation (38 LOC)
313
+ ├── object.ts # Object utilities (33 LOC)
314
+ ├── cache.ts # Cache helpers (11 LOC)
315
+ ├── http.ts # HTTP utilities (25 LOC)
316
+ ├── format.ts # Formatting (27 LOC)
317
+ └── runtime.ts # Runtime detection (47 LOC)
318
+ ```
319
+
320
+ ### Key Design Principles
321
+
322
+ 1. **Modular Architecture**: Each file has a single, clear responsibility
323
+ 2. **Small Files**: All files <250 LOC for easy maintenance
324
+ 3. **Type Safety**: Strict TypeScript with explicit types throughout
325
+ 4. **Testability**: 146 tests with >90% coverage
326
+ 5. **Security First**: SSRF protection and PII redaction built-in
327
+ 6. **Performance**: Smart caching and optimized parsing
328
+
329
+ ### Recent Improvements (Phase 2 Refactoring)
330
+
331
+ - ✅ Extracted QueryOrchestrator from RDAPClient (-29% LOC)
332
+ - ✅ Split validators into focused modules (-87% in main file)
333
+ - ✅ Split helpers into focused modules (-80% in main file)
334
+ - ✅ Split types into enums, entities, responses (-87% in main file)
335
+ - ✅ 712 lines of duplication eliminated
336
+ - ✅ 100% backward compatible (re-export shims)
337
+
338
+ See [REFACTOR_STATUS.md](REFACTOR_STATUS.md) for detailed refactoring progress.
339
+
340
+ ### 📋 Roadmap to v0.2.0 (Continued)
341
+ - CLI tool with interactive mode
342
+ - Bun/Deno runtime compatibility testing
343
+ - Live integration tests (optional via LIVE_TESTS=1)
344
+ - Performance benchmarks with real data
345
+ - Rate limiting implementation
346
+
347
+ **Want to contribute?** Check out our [CONTRIBUTING.md](CONTRIBUTING.md) and [ROADMAP.md](ROADMAP.md)!
348
+
349
+ ## 🔍 Version Verification
350
+
351
+ RDAPify intentionally does **not** export `./package.json` in the package exports for security and API surface minimization. Attempting to import it will throw an expected error:
352
+
353
+ ```javascript
354
+ // ❌ This will throw ERR_PACKAGE_PATH_NOT_EXPORTED (expected behavior)
355
+ const pkg = require('rdapify/package.json');
356
+ // Error: Package subpath './package.json' is not defined by "exports"
357
+ ```
358
+
359
+ ### Safe Version Verification Methods
360
+
361
+ **Method 1: Using npm (recommended)**
362
+ ```bash
363
+ npm ls rdapify
364
+ # Output: rdapify@0.1.0
365
+ ```
366
+
367
+ **Method 2: Programmatic check via require.resolve**
368
+ ```javascript
369
+ const fs = require('fs');
370
+ const path = require('path');
371
+
372
+ const entry = require.resolve('rdapify');
373
+ const pkgPath = path.join(path.dirname(entry), '..', 'package.json');
374
+ const version = JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version;
375
+
376
+ console.log('rdapify version:', version);
377
+ // Output: 0.1.0
378
+ ```
379
+
380
+ **Method 3: Check installed version in package.json**
381
+ ```bash
382
+ cat node_modules/rdapify/package.json | grep version
383
+ ```
384
+
385
+ This design decision prevents accidental exposure of internal package metadata and maintains a minimal public API surface.
386
+
387
+ ## 🏢 Early Adopters & Feedback
388
+
389
+ We're looking for early adopters and beta testers! If you're interested in:
390
+
391
+ - Testing the library in your environment
392
+ - Providing feedback on the API design
393
+ - Contributing to the codebase
394
+ - Reporting bugs or suggesting features
201
395
 
202
- The following companies use RDAPify in production systems:
396
+ **Get involved**:
397
+ - 🌐 Visit our website: [rdapify.com](https://rdapify.com)
398
+ - 🐛 Open a [GitHub Issue](https://github.com/rdapify/RDAPify/issues) for bugs or feature requests
399
+ - 💬 Start a [GitHub Discussion](https://github.com/rdapify/RDAPify/discussions) for questions or ideas
400
+ - 📖 Read the [Documentation](https://rdapify.com/docs)
401
+ - 🤝 Check out [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines
203
402
 
204
- [![Enterprise Logo 1](https://via.placeholder.com/120x40?text=Enterprise1)](https://example.com)
205
- [![Enterprise Logo 2](https://via.placeholder.com/120x40?text=Enterprise2)](https://example.com)
206
- [![Enterprise Logo 3](https://via.placeholder.com/120x40?text=Enterprise3)](https://example.com)
207
- [![Enterprise Logo 4](https://via.placeholder.com/120x40?text=Enterprise4)](https://example.com)
403
+ ### Known Issues & Limitations
208
404
 
209
- **Using RDAPify at your company?** [Let us know](https://rdapify.dev/companies) to be added to our list.
405
+ - Only in-memory caching available (Redis adapter planned for v0.2.0)
406
+ - No CLI tool yet (programmatic API only)
407
+ - Bun/Deno/Cloudflare Workers compatibility not yet tested
408
+ - Live RDAP server tests disabled by default (use `LIVE_TESTS=1` to enable)
210
409
 
211
410
  ## 📜 License
212
411
 
@@ -220,5 +419,5 @@ We thank the global RDAP community, IANA teams, and Regional Internet Registry (
220
419
 
221
420
  > **Note:** RDAPify is an independent project not affiliated with any domain registry or official internet authority. All trademarks and products mentioned are property of their respective owners.
222
421
  >
223
- > © 2025 RDAPify — Built for enterprises that don't compromise on quality and security.
224
- > [Security Policy](SECURITY.md) • [Privacy Policy](PRIVACY.md) • [Contact Us](mailto:hello@rdapify.dev)
422
+ > © 2025 RDAPify Contributors — Built for enterprises that don't compromise on quality and security.
423
+ > [Security Policy](SECURITY.md) • [Privacy Policy](PRIVACY.md) • [License](LICENSE)
@@ -0,0 +1,32 @@
1
+ import type { DomainResponse, IPResponse, ASNResponse } from '../../shared/types';
2
+ import type { RDAPClientOptions } from '../../shared/types/options';
3
+ export declare class RDAPClient {
4
+ private readonly options;
5
+ private readonly cache;
6
+ private readonly fetcher;
7
+ private readonly ssrfProtection;
8
+ private readonly bootstrap;
9
+ private readonly normalizer;
10
+ private readonly piiRedactor;
11
+ private readonly orchestrator;
12
+ constructor(options?: RDAPClientOptions);
13
+ domain(domain: string): Promise<DomainResponse>;
14
+ ip(ip: string): Promise<IPResponse>;
15
+ asn(asn: string | number): Promise<ASNResponse>;
16
+ private fetchWithRetry;
17
+ private normalizeOptions;
18
+ clearCache(): Promise<void>;
19
+ getStats(): Promise<{
20
+ cache: {
21
+ size: number;
22
+ enabled: boolean;
23
+ ttl: number;
24
+ };
25
+ bootstrap: {
26
+ size: number;
27
+ types: string[];
28
+ };
29
+ }>;
30
+ getConfig(): Required<RDAPClientOptions>;
31
+ }
32
+ //# sourceMappingURL=RDAPClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RDAPClient.d.ts","sourceRoot":"","sources":["../../../src/application/client/RDAPClient.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGlF,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,4BAA4B,CAAC;AAkBpC,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8B;IACtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;gBAErC,OAAO,GAAE,iBAAsB;IA2ErC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAiB/C,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAgBnC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;YAOvC,cAAc;IA0C5B,OAAO,CAAC,gBAAgB;IAOlB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,QAAQ,IAAI,OAAO,CAAC;QACxB,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,OAAO,CAAC;YACjB,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,EAAE,CAAC;SACjB,CAAC;KACH,CAAC;IAUF,SAAS,IAAI,QAAQ,CAAC,iBAAiB,CAAC;CAGzC"}