rdapify 0.1.6 → 0.1.7
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/CHANGELOG.md +139 -94
- package/README.md +168 -146
- package/dist/application/client/RDAPClient.d.ts +3 -1
- package/dist/application/client/RDAPClient.d.ts.map +1 -1
- package/dist/application/client/RDAPClient.js +6 -0
- package/dist/application/client/RDAPClient.js.map +1 -1
- package/dist/application/hooks/MiddlewareHooks.d.ts +1 -1
- package/dist/application/hooks/MiddlewareHooks.d.ts.map +1 -1
- package/dist/application/services/BatchProcessor.d.ts +1 -0
- package/dist/application/services/BatchProcessor.d.ts.map +1 -1
- package/dist/application/services/BatchProcessor.js +9 -0
- package/dist/application/services/BatchProcessor.js.map +1 -1
- package/dist/application/services/QueryOrchestrator.d.ts +3 -1
- package/dist/application/services/QueryOrchestrator.d.ts.map +1 -1
- package/dist/application/services/QueryOrchestrator.js +192 -0
- package/dist/application/services/QueryOrchestrator.js.map +1 -1
- package/dist/cli/index.js +78 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/http/BootstrapDiscovery.d.ts +1 -0
- package/dist/infrastructure/http/BootstrapDiscovery.d.ts.map +1 -1
- package/dist/infrastructure/http/BootstrapDiscovery.js +19 -0
- package/dist/infrastructure/http/BootstrapDiscovery.js.map +1 -1
- package/dist/infrastructure/http/Fetcher.js +1 -1
- package/dist/infrastructure/http/Normalizer.d.ts +2 -0
- package/dist/infrastructure/http/Normalizer.d.ts.map +1 -1
- package/dist/infrastructure/http/Normalizer.js +57 -0
- package/dist/infrastructure/http/Normalizer.js.map +1 -1
- package/dist/infrastructure/logging/AuditLogger.d.ts +7 -7
- package/dist/infrastructure/logging/AuditLogger.d.ts.map +1 -1
- package/dist/infrastructure/logging/AuditLogger.js.map +1 -1
- package/dist/infrastructure/monitoring/MetricsCollector.d.ts +3 -3
- package/dist/infrastructure/monitoring/MetricsCollector.d.ts.map +1 -1
- package/dist/infrastructure/monitoring/MetricsCollector.js.map +1 -1
- package/dist/shared/constants/rdap.constants.d.ts +1 -1
- package/dist/shared/constants/rdap.constants.js +1 -1
- package/dist/shared/types/generics.d.ts +6 -3
- package/dist/shared/types/generics.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +1 -1
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/shared/types/options.js +1 -1
- package/dist/shared/types/responses.d.ts +42 -2
- package/dist/shared/types/responses.d.ts.map +1 -1
- package/dist/shared/utils/validators/entity.d.ts +3 -0
- package/dist/shared/utils/validators/entity.d.ts.map +1 -0
- package/dist/shared/utils/validators/entity.js +27 -0
- package/dist/shared/utils/validators/entity.js.map +1 -0
- package/dist/shared/utils/validators/index.d.ts +2 -0
- package/dist/shared/utils/validators/index.d.ts.map +1 -1
- package/dist/shared/utils/validators/index.js +7 -1
- package/dist/shared/utils/validators/index.js.map +1 -1
- package/dist/shared/utils/validators/nameserver.d.ts +3 -0
- package/dist/shared/utils/validators/nameserver.d.ts.map +1 -0
- package/dist/shared/utils/validators/nameserver.js +49 -0
- package/dist/shared/utils/validators/nameserver.js.map +1 -0
- package/package.json +6 -10
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,93 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [Unreleased]
|
|
8
|
+
## [Unreleased] — v0.1.8 Planned
|
|
9
|
+
|
|
10
|
+
### Planned
|
|
11
|
+
- **Domain Availability**: `client.checkAvailability(domain)` — check if a domain is available via RDAP (404 = available, active = registered)
|
|
12
|
+
- **Bulk Availability**: `client.checkAvailabilityBatch(domains[])` — check multiple domains in parallel
|
|
13
|
+
- **Live Integration Tests**: opt-in via `LIVE_TESTS=1` environment variable
|
|
14
|
+
- **Advanced Bootstrap Config**: custom bootstrap servers, TTL overrides, redundancy/fallback support
|
|
15
|
+
|
|
16
|
+
## [0.1.7] - 2026-03-19
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Playground deployment**: `website/static/playground-app/app.js` was out of sync with `playground/public/app.js`; domains returning HTTP 404 now correctly show "Domain Available" instead of an error
|
|
21
|
+
- **Jest forceExit**: Added `forceExit: true` to `jest.config.js` to prevent CI hangs caused by open Redis async handles
|
|
22
|
+
- **redis-cache tests**: Updated tests to match `scanAll()`/`keys()` implementation instead of the removed `dbSize()`/`flushDb()` approach
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **Nameserver queries**: New `client.nameserver(hostname)` method for querying nameserver RDAP data
|
|
27
|
+
- Automatic server discovery via IANA DNS TLD bootstrap
|
|
28
|
+
- Returns `NameserverResponse` with `ldhName`, `ipAddresses`, `status`, `entities`, `events`
|
|
29
|
+
- Full support for caching, middleware hooks, metrics, deduplication, and PII redaction
|
|
30
|
+
- **Entity queries**: New `client.entity(handle, serverUrl)` method for querying RDAP entity data
|
|
31
|
+
- Returns `EntityResponse` with `handle`, `vcardArray`, `roles`, `status`, `entities`, `events`
|
|
32
|
+
- Requires explicit `serverUrl` (no global IANA bootstrap exists for entities)
|
|
33
|
+
- Full support for caching, middleware hooks, metrics, and deduplication
|
|
34
|
+
- **CLI commands extended**:
|
|
35
|
+
- `rdapify nameserver <hostname>` — query nameserver RDAP data
|
|
36
|
+
- `rdapify entity <handle> --server <url>` — query entity RDAP data
|
|
37
|
+
- New `--server <url>` flag for specifying RDAP server URL
|
|
38
|
+
- **New response types**: `NameserverResponse` and `EntityResponse` exported from main entry point
|
|
39
|
+
- **New validators exported**: `validateNameserver`, `normalizeNameserver`, `validateEntityHandle`, `normalizeEntityHandle`
|
|
40
|
+
- **Normalizer extended**: Handles `nameserver` and `entity` objectClassName values from raw RDAP responses
|
|
41
|
+
- **BootstrapDiscovery extended**: New `discoverNameserver()` method using DNS TLD bootstrap
|
|
42
|
+
|
|
43
|
+
## [0.1.6] - 2026-03-17
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- **isCloudflareWorkers()**: New runtime detection function for Cloudflare Workers environment
|
|
48
|
+
- **CLI Tool**: New `rdapify` CLI command with zero external dependencies
|
|
49
|
+
- `rdapify domain <name>` — query domain RDAP data
|
|
50
|
+
- `rdapify ip <addr>` — query IP RDAP data
|
|
51
|
+
- `rdapify asn <num>` — query ASN RDAP data
|
|
52
|
+
- Flags: `--json`, `--no-cache`, `--timeout`
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **RedisCache.clear() (Critical)**: Previously called `flushDb()` which wiped the entire Redis database; now only deletes keys matching the configured prefix using SCAN
|
|
57
|
+
- **RedisCache.size() (Critical)**: Previously used `dbSize()` returning total DB size; now counts only prefixed keys accurately
|
|
58
|
+
- **RedisCache SCAN (Performance)**: Replaced blocking `KEYS` command with non-blocking `SCAN` iteration; added `scanAll()` private helper; added optional `scan?()` to `RedisClientLike` interface; removed unused `flushDb?()` and `dbSize?()` from interface
|
|
59
|
+
- **runtime.ts (Compatibility)**: `isNode()` wrapped with `typeof process !== 'undefined'` guard to prevent `ReferenceError` in Cloudflare Workers
|
|
60
|
+
|
|
61
|
+
## [0.1.5] - 2026-03-14
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- **RedisCache**: Redis adapter with peer-dependency pattern, compatible with ioredis and node-redis v4+
|
|
66
|
+
- **AuthenticationManager**: Support for Bearer tokens, API keys, Basic auth, and OAuth2
|
|
67
|
+
- **ProxyManager**: HTTP/HTTPS/SOCKS proxy support for RDAP requests
|
|
68
|
+
- **CompressionManager**: gzip/deflate/brotli compression for requests/responses
|
|
69
|
+
- **PersistentCache**: File-system backed cache that survives process restarts
|
|
70
|
+
- **MiddlewareManager**: Full lifecycle hooks — `beforeQuery`, `afterQuery`, `onError`, `onCacheHit`
|
|
71
|
+
- **QueryDeduplicator**: Collapses in-flight duplicate queries into a single upstream request
|
|
72
|
+
- **AuditLogger**: GDPR/SOC2-compliant audit trail with `InMemoryAuditAdapter` and `FileAuditAdapter`
|
|
73
|
+
- **ResponseValidator**: RFC 7483 response validation with strict and lenient modes
|
|
74
|
+
- All new classes exported from main entry point
|
|
75
|
+
|
|
76
|
+
## [0.1.4] - 2026-03-13
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **MiddlewareHooks**: Middleware hooks system (`src/application/hooks/MiddlewareHooks.ts`)
|
|
81
|
+
- **QueryDeduplicator**: Initial implementation (`src/application/deduplication/QueryDeduplicator.ts`)
|
|
82
|
+
- **AuditLogger**: Initial implementation (`src/infrastructure/logging/AuditLogger.ts`)
|
|
83
|
+
- **ResponseValidator**: RFC 7483 compliance validation (`src/infrastructure/validation/ResponseValidator.ts`)
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- **TypeScript strict mode**: Enabled and enforced strict mode improvements across the codebase
|
|
88
|
+
- **Generic types**: Enhanced type safety in `src/shared/types/generics.ts`
|
|
89
|
+
- **QueryPriority**: Improved type safety in `src/application/services/QueryPriority.ts`
|
|
90
|
+
- **BatchProcessor**: Improved type safety in `src/application/services/BatchProcessor.ts`
|
|
91
|
+
|
|
92
|
+
### Testing
|
|
93
|
+
|
|
94
|
+
- Additional test coverage for edge cases across existing and new modules
|
|
9
95
|
|
|
10
96
|
## [0.1.3] - 2026-03-12
|
|
11
97
|
|
|
@@ -77,17 +163,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
77
163
|
- Multiple package manager support (npm, yarn, pnpm)
|
|
78
164
|
- Integrated into website navigation
|
|
79
165
|
- Production-ready documentation and testing guides
|
|
166
|
+
- **Connection Pooling**: HTTP connection reuse for 30-40% performance improvement
|
|
167
|
+
- Configurable max connections per host
|
|
168
|
+
- Automatic idle connection cleanup
|
|
169
|
+
- Keep-alive support for persistent connections
|
|
170
|
+
- **Metrics & Monitoring**: Comprehensive query metrics tracking
|
|
171
|
+
- Success/failure rates and response times
|
|
172
|
+
- Cache hit/miss statistics
|
|
173
|
+
- Query type distribution (domain/IP/ASN)
|
|
174
|
+
- Error type tracking
|
|
175
|
+
- Time-based filtering and analysis
|
|
176
|
+
- **Request/Response Logging**: Detailed logging system with multiple levels
|
|
177
|
+
- Configurable log levels (debug, info, warn, error)
|
|
178
|
+
- Request/response logging with timing
|
|
179
|
+
- Cache operation logging
|
|
180
|
+
- Performance metrics logging
|
|
181
|
+
- JSON and text output formats
|
|
182
|
+
- Log filtering and export capabilities
|
|
183
|
+
- **Client API Extensions**: New methods for monitoring and debugging
|
|
184
|
+
- `getMetrics()`: Get query metrics summary
|
|
185
|
+
- `getConnectionPoolStats()`: Get connection pool statistics
|
|
186
|
+
- `getLogger()`: Access logger instance
|
|
187
|
+
- `getLogs()`: Retrieve recent logs
|
|
188
|
+
- `clearAll()`: Clear all caches, metrics, and logs
|
|
189
|
+
- `destroy()`: Clean up resources
|
|
80
190
|
|
|
81
191
|
### Changed
|
|
82
192
|
- Updated website navigation to include Playground link
|
|
83
193
|
- Enhanced documentation for production deployment
|
|
194
|
+
- **QueryOrchestrator**: Integrated logging and metrics collection into all query methods
|
|
195
|
+
- **RDAPClient**: Added connection pool, metrics collector, and logger initialization
|
|
84
196
|
|
|
85
197
|
### Fixed
|
|
86
198
|
- ESLint errors in Logger.ts and enhanced-validators.ts (6 issues resolved)
|
|
87
199
|
|
|
200
|
+
### Tests
|
|
201
|
+
- Added comprehensive test suites for new features:
|
|
202
|
+
- `connection-pool.test.ts`: 9 tests covering connection management
|
|
203
|
+
- `metrics-collector.test.ts`: 11 tests covering metrics tracking
|
|
204
|
+
- `logger.test.ts`: 18 tests covering logging functionality
|
|
205
|
+
|
|
88
206
|
## [0.1.1] - 2026-01-25
|
|
89
207
|
|
|
90
|
-
### Added
|
|
208
|
+
### Added
|
|
91
209
|
- **Authentication Support**: Multiple authentication methods for RDAP servers
|
|
92
210
|
- Basic Authentication (username/password)
|
|
93
211
|
- Bearer Token authentication
|
|
@@ -105,8 +223,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
105
223
|
- Automatic response decompression
|
|
106
224
|
- Compression statistics and ratio calculation
|
|
107
225
|
- Configurable compression threshold
|
|
108
|
-
|
|
109
|
-
### Added - Phase 2 Improvements
|
|
110
226
|
- **Retry Strategies**: Advanced retry logic with circuit breaker pattern
|
|
111
227
|
- Exponential, linear, and fixed backoff strategies
|
|
112
228
|
- Exponential backoff with jitter to prevent thundering herd
|
|
@@ -130,85 +246,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
130
246
|
- TTL and max size enforcement
|
|
131
247
|
- LRU eviction policy
|
|
132
248
|
- Cache statistics and cleanup
|
|
133
|
-
|
|
134
|
-
### Changed
|
|
135
|
-
- **Exports**: Added new exports for Phase 2 features in index.ts
|
|
136
|
-
|
|
137
|
-
### Tests
|
|
138
|
-
- Added comprehensive test suites for Phase 3 features:
|
|
139
|
-
- `authentication-manager.test.ts`: 17 tests covering all auth methods
|
|
140
|
-
- `proxy-manager.test.ts`: 16 tests covering proxy configuration
|
|
141
|
-
- `compression-manager.test.ts`: 19 tests covering compression/decompression
|
|
142
|
-
- Added comprehensive test suites for Phase 2 features:
|
|
143
|
-
- `retry-strategy.test.ts`: 13 tests covering retry logic and circuit breaker
|
|
144
|
-
- `query-priority.test.ts`: 8 tests covering priority queue functionality
|
|
145
|
-
- `enhanced-validators.test.ts`: 21 tests covering validation enhancements
|
|
146
|
-
- `persistent-cache.test.ts`: 13 tests covering persistent storage
|
|
147
|
-
|
|
148
|
-
### Performance
|
|
149
|
-
- **Retry Strategies**: Intelligent retry reduces failed requests
|
|
150
|
-
- **Query Prioritization**: Critical queries execute first
|
|
151
|
-
- **Persistent Cache**: Faster startup with pre-loaded cache
|
|
152
|
-
|
|
153
|
-
## [0.1.2] - 2026-01-26
|
|
154
|
-
|
|
155
|
-
### Added - Phase 1 Improvements
|
|
156
|
-
- **Connection Pooling**: HTTP connection reuse for 30-40% performance improvement
|
|
157
|
-
- Configurable max connections per host
|
|
158
|
-
- Automatic idle connection cleanup
|
|
159
|
-
- Keep-alive support for persistent connections
|
|
160
|
-
- **Metrics & Monitoring**: Comprehensive query metrics tracking
|
|
161
|
-
- Success/failure rates and response times
|
|
162
|
-
- Cache hit/miss statistics
|
|
163
|
-
- Query type distribution (domain/IP/ASN)
|
|
164
|
-
- Error type tracking
|
|
165
|
-
- Time-based filtering and analysis
|
|
166
|
-
- **Request/Response Logging**: Detailed logging system with multiple levels
|
|
167
|
-
- Configurable log levels (debug, info, warn, error)
|
|
168
|
-
- Request/response logging with timing
|
|
169
|
-
- Cache operation logging
|
|
170
|
-
- Performance metrics logging
|
|
171
|
-
- JSON and text output formats
|
|
172
|
-
- Log filtering and export capabilities
|
|
173
|
-
- **Client API Extensions**: New methods for monitoring and debugging
|
|
174
|
-
- `getMetrics()`: Get query metrics summary
|
|
175
|
-
- `getConnectionPoolStats()`: Get connection pool statistics
|
|
176
|
-
- `getLogger()`: Access logger instance
|
|
177
|
-
- `getLogs()`: Retrieve recent logs
|
|
178
|
-
- `clearAll()`: Clear all caches, metrics, and logs
|
|
179
|
-
- `destroy()`: Clean up resources
|
|
180
|
-
|
|
181
|
-
### Changed
|
|
182
|
-
- **QueryOrchestrator**: Integrated logging and metrics collection into all query methods
|
|
183
|
-
- **RDAPClient**: Added connection pool, metrics collector, and logger initialization
|
|
184
|
-
|
|
185
|
-
### Tests
|
|
186
|
-
- Added comprehensive test suites for new features:
|
|
187
|
-
- `connection-pool.test.ts`: 9 tests covering connection management
|
|
188
|
-
- `metrics-collector.test.ts`: 11 tests covering metrics tracking
|
|
189
|
-
- `logger.test.ts`: 18 tests covering logging functionality
|
|
190
|
-
|
|
191
|
-
## [0.1.1] - 2026-01-25
|
|
192
|
-
|
|
193
|
-
### Added
|
|
194
249
|
- **Rate Limiting**: Token bucket rate limiter with multi-key support and auto-cleanup
|
|
195
250
|
- **Batch Processing**: Efficient concurrent processing of multiple RDAP queries
|
|
196
251
|
- **Enhanced Error Handling**: Errors now include suggestions, timestamps, and user-friendly messages
|
|
197
252
|
- **Generic Types**: Type-safe query functions with automatic result type inference
|
|
198
253
|
- **Tree Shaking Support**: Modular exports for smaller bundle sizes
|
|
199
|
-
- **Comprehensive Tests**: Added 37+ new tests for PIIRedactor, CacheManager, and RateLimiter
|
|
200
254
|
|
|
201
255
|
### Changed
|
|
256
|
+
- **Exports**: Added new exports for all Phase 1–3 features in index.ts
|
|
202
257
|
- **Error Classes**: All errors now include `suggestion`, `timestamp`, and `getUserMessage()` method
|
|
203
258
|
- **RateLimitError**: Added `retryAfter` field to indicate when to retry
|
|
204
259
|
- **Package Exports**: Added modular exports for errors, types, and validators
|
|
205
260
|
- **TypeScript Config**: Optimized for better tree shaking and smaller output
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- **Developer Experience**: More helpful error messages and suggestions
|
|
211
|
-
- **Performance**: Batch processing with configurable concurrency
|
|
261
|
+
- Standardized Node.js version to v20 across all GitHub Actions workflows
|
|
262
|
+
- Updated all workflows to use `node-version-file: .nvmrc` for consistency
|
|
263
|
+
- Improved npm caching in CI/CD workflows for faster builds
|
|
264
|
+
- Added `NODE_ENV: production` to website build workflow
|
|
212
265
|
|
|
213
266
|
### Fixed
|
|
214
267
|
- Fixed prism-react-renderer theme import in Docusaurus configuration
|
|
@@ -219,19 +272,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
219
272
|
- Fixed missing sidebars.js configuration
|
|
220
273
|
- Removed empty pages causing build failures
|
|
221
274
|
|
|
222
|
-
###
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
275
|
+
### Tests
|
|
276
|
+
- Added comprehensive test suites:
|
|
277
|
+
- `authentication-manager.test.ts`: 17 tests covering all auth methods
|
|
278
|
+
- `proxy-manager.test.ts`: 16 tests covering proxy configuration
|
|
279
|
+
- `compression-manager.test.ts`: 19 tests covering compression/decompression
|
|
280
|
+
- `retry-strategy.test.ts`: 13 tests covering retry logic and circuit breaker
|
|
281
|
+
- `query-priority.test.ts`: 8 tests covering priority queue functionality
|
|
282
|
+
- `enhanced-validators.test.ts`: 21 tests covering validation enhancements
|
|
283
|
+
- `persistent-cache.test.ts`: 13 tests covering persistent storage
|
|
284
|
+
- PIIRedactor, CacheManager, and RateLimiter: 37+ new tests
|
|
229
285
|
|
|
230
|
-
###
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
- Added comprehensive CI/CD fixes documentation
|
|
286
|
+
### Performance
|
|
287
|
+
- **Retry Strategies**: Intelligent retry reduces failed requests
|
|
288
|
+
- **Query Prioritization**: Critical queries execute first
|
|
289
|
+
- **Persistent Cache**: Faster startup with pre-loaded cache
|
|
235
290
|
|
|
236
291
|
## [0.1.0] - 2025-01-25
|
|
237
292
|
|
|
@@ -361,16 +416,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
361
416
|
- ESLint for code quality
|
|
362
417
|
- Prettier for code formatting
|
|
363
418
|
|
|
364
|
-
## [Unreleased]
|
|
365
|
-
|
|
366
|
-
### Planned for v0.2.0
|
|
367
|
-
- Redis cache implementation
|
|
368
|
-
- CLI tool for quick queries
|
|
369
|
-
- Live integration tests
|
|
370
|
-
- Improved error messages
|
|
371
|
-
- Performance benchmarks
|
|
372
|
-
- Additional runtime support (Bun, Deno)
|
|
373
|
-
|
|
374
419
|
---
|
|
375
420
|
|
|
376
421
|
[0.1.0-alpha.1]: https://github.com/rdapify/rdapify/releases/tag/v0.1.0-alpha.1
|