rdapify 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ar.md +572 -0
- package/README.md +74 -77
- package/dist/{application → cjs/application}/client/RDAPClient.js +197 -6
- package/dist/{application → cjs/application}/client/index.js +0 -1
- package/dist/{application → cjs/application}/deduplication/QueryDeduplicator.js +0 -1
- package/dist/{application → cjs/application}/hooks/MiddlewareHooks.js +0 -1
- package/dist/{application → cjs/application}/services/BatchProcessor.js +0 -1
- package/dist/{application → cjs/application}/services/QueryOrchestrator.js +0 -1
- package/dist/{application → cjs/application}/services/QueryPriority.js +0 -1
- package/dist/{application → cjs/application}/services/index.js +0 -1
- package/dist/{cli → cjs/cli}/index.js +0 -1
- package/dist/cjs/core/ports/bootstrap.port.js +2 -0
- package/dist/cjs/core/ports/cache.port.js +2 -0
- package/dist/cjs/core/ports/fetcher.port.js +2 -0
- package/dist/{core → cjs/core}/ports/index.js +0 -1
- package/dist/cjs/core/ports/normalizer.port.js +2 -0
- package/dist/cjs/core/ports/pii-redactor.port.js +2 -0
- package/dist/{index.js → cjs/index.js} +8 -4
- package/dist/{infrastructure → cjs/infrastructure}/cache/CacheManager.js +4 -1
- package/dist/{infrastructure → cjs/infrastructure}/cache/InMemoryCache.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/cache/PersistentCache.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/cache/RedisCache.js +0 -1
- package/dist/cjs/infrastructure/cache/StaleWhileRevalidateCache.js +47 -0
- package/dist/{infrastructure → cjs/infrastructure}/cache/index.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/AuthenticationManager.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/BootstrapDiscovery.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/BrowserFetcher.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/BunFetcher.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/CircuitBreaker.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/CloudflareWorkersFetcher.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/CompressionManager.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/ConnectionPool.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/DenoFetcher.js +0 -1
- package/dist/cjs/infrastructure/http/DistributedRateLimiter.js +26 -0
- package/dist/{infrastructure → cjs/infrastructure}/http/Fetcher.js +5 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/Normalizer.js +23 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/ProxyManager.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/RateLimiter.js +6 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/RetryStrategy.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/http/index.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/logging/AuditLogger.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/logging/Logger.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/monitoring/GrafanaDashboard.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/monitoring/MetricsCollector.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/monitoring/PrometheusExporter.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/monitoring/TelemetryExporter.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/native/NativeBackend.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/security/PIIRedactor.js +0 -1
- package/dist/{infrastructure → cjs/infrastructure}/security/SSRFProtection.js +23 -1
- package/dist/{infrastructure → cjs/infrastructure}/security/index.js +0 -1
- package/dist/cjs/infrastructure/telemetry/UsageTelemetry.js +89 -0
- package/dist/{infrastructure → cjs/infrastructure}/validation/ResponseValidator.js +0 -1
- package/dist/{integrations → cjs/integrations}/express.js +0 -1
- package/dist/{integrations → cjs/integrations}/graphql.js +0 -1
- package/dist/{integrations → cjs/integrations}/nestjs.js +0 -1
- package/dist/{shared → cjs/shared}/constants/http.constants.js +0 -1
- package/dist/{shared → cjs/shared}/constants/index.js +0 -1
- package/dist/{shared → cjs/shared}/constants/rdap.constants.js +0 -1
- package/dist/{shared → cjs/shared}/errors/base.error.js +7 -2
- package/dist/{shared → cjs/shared}/errors/index.js +0 -1
- package/dist/{shared → cjs/shared}/types/entities.js +0 -1
- package/dist/{shared → cjs/shared}/types/enums.js +0 -1
- package/dist/{shared → cjs/shared}/types/errors.js +0 -1
- package/dist/{shared → cjs/shared}/types/generics.js +0 -1
- package/dist/{shared → cjs/shared}/types/index.js +0 -1
- package/dist/{shared → cjs/shared}/types/options.js +5 -1
- package/dist/cjs/shared/types/responses.js +2 -0
- package/dist/{shared → cjs/shared}/utils/deprecation.js +0 -1
- package/dist/{shared → cjs/shared}/utils/enhanced-validators.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/async.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/cache.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/format.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/http.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/index.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/object.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/runtime.js +0 -1
- package/dist/{shared → cjs/shared}/utils/helpers/string.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/asn.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/config-validation.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/domain.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/entity.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/index.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/ip.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/nameserver.js +0 -1
- package/dist/{shared → cjs/shared}/utils/validators/network.js +0 -1
- package/dist/esm/application/client/RDAPClient.js +439 -0
- package/dist/esm/application/client/index.js +1 -0
- package/dist/esm/application/deduplication/QueryDeduplicator.js +41 -0
- package/dist/esm/application/hooks/MiddlewareHooks.js +79 -0
- package/dist/esm/application/services/BatchProcessor.js +145 -0
- package/dist/esm/application/services/QueryOrchestrator.js +615 -0
- package/dist/esm/application/services/QueryPriority.js +109 -0
- package/dist/esm/application/services/index.js +2 -0
- package/dist/esm/cli/index.js +297 -0
- package/dist/esm/core/ports/bootstrap.port.js +1 -0
- package/dist/esm/core/ports/cache.port.js +1 -0
- package/dist/esm/core/ports/fetcher.port.js +1 -0
- package/dist/esm/core/ports/index.js +5 -0
- package/dist/esm/core/ports/normalizer.port.js +1 -0
- package/dist/esm/core/ports/pii-redactor.port.js +1 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/infrastructure/cache/CacheManager.js +123 -0
- package/dist/esm/infrastructure/cache/InMemoryCache.js +91 -0
- package/dist/esm/infrastructure/cache/PersistentCache.js +188 -0
- package/dist/esm/infrastructure/cache/RedisCache.js +106 -0
- package/dist/esm/infrastructure/cache/StaleWhileRevalidateCache.js +43 -0
- package/dist/esm/infrastructure/cache/index.js +3 -0
- package/dist/esm/infrastructure/http/AuthenticationManager.js +94 -0
- package/dist/esm/infrastructure/http/BootstrapDiscovery.js +189 -0
- package/dist/esm/infrastructure/http/BrowserFetcher.js +42 -0
- package/dist/esm/infrastructure/http/BunFetcher.js +46 -0
- package/dist/esm/infrastructure/http/CircuitBreaker.js +98 -0
- package/dist/esm/infrastructure/http/CloudflareWorkersFetcher.js +39 -0
- package/dist/esm/infrastructure/http/CompressionManager.js +80 -0
- package/dist/esm/infrastructure/http/ConnectionPool.js +101 -0
- package/dist/esm/infrastructure/http/DenoFetcher.js +38 -0
- package/dist/esm/infrastructure/http/DistributedRateLimiter.js +22 -0
- package/dist/esm/infrastructure/http/Fetcher.js +127 -0
- package/dist/esm/infrastructure/http/Normalizer.js +233 -0
- package/dist/esm/infrastructure/http/ProxyManager.js +82 -0
- package/dist/esm/infrastructure/http/RateLimiter.js +102 -0
- package/dist/esm/infrastructure/http/RetryStrategy.js +131 -0
- package/dist/esm/infrastructure/http/index.js +3 -0
- package/dist/esm/infrastructure/logging/AuditLogger.js +187 -0
- package/dist/esm/infrastructure/logging/Logger.js +145 -0
- package/dist/esm/infrastructure/monitoring/GrafanaDashboard.js +115 -0
- package/dist/esm/infrastructure/monitoring/MetricsCollector.js +284 -0
- package/dist/esm/infrastructure/monitoring/PrometheusExporter.js +72 -0
- package/dist/esm/infrastructure/monitoring/TelemetryExporter.js +112 -0
- package/dist/esm/infrastructure/native/NativeBackend.js +86 -0
- package/dist/esm/infrastructure/security/PIIRedactor.js +85 -0
- package/dist/esm/infrastructure/security/SSRFProtection.js +162 -0
- package/dist/esm/infrastructure/security/index.js +2 -0
- package/dist/esm/infrastructure/telemetry/UsageTelemetry.js +84 -0
- package/dist/esm/infrastructure/validation/ResponseValidator.js +194 -0
- package/dist/esm/integrations/express.js +43 -0
- package/dist/esm/integrations/graphql.js +80 -0
- package/dist/esm/integrations/nestjs.js +23 -0
- package/dist/esm/shared/constants/http.constants.js +25 -0
- package/dist/esm/shared/constants/index.js +2 -0
- package/dist/esm/shared/constants/rdap.constants.js +17 -0
- package/dist/esm/shared/errors/base.error.js +140 -0
- package/dist/esm/shared/errors/index.js +1 -0
- package/dist/esm/shared/types/entities.js +1 -0
- package/dist/esm/shared/types/enums.js +1 -0
- package/dist/esm/shared/types/errors.js +82 -0
- package/dist/esm/shared/types/generics.js +1 -0
- package/dist/esm/shared/types/index.js +1 -0
- package/dist/esm/shared/types/options.js +66 -0
- package/dist/esm/shared/types/responses.js +1 -0
- package/dist/esm/shared/utils/deprecation.js +20 -0
- package/dist/esm/shared/utils/enhanced-validators.js +148 -0
- package/dist/esm/shared/utils/helpers/async.js +40 -0
- package/dist/esm/shared/utils/helpers/cache.js +3 -0
- package/dist/esm/shared/utils/helpers/format.js +17 -0
- package/dist/esm/shared/utils/helpers/http.js +13 -0
- package/dist/esm/shared/utils/helpers/index.js +7 -0
- package/dist/esm/shared/utils/helpers/object.js +19 -0
- package/dist/esm/shared/utils/helpers/runtime.js +34 -0
- package/dist/esm/shared/utils/helpers/string.js +23 -0
- package/dist/esm/shared/utils/validators/asn.js +25 -0
- package/dist/esm/shared/utils/validators/config-validation.js +93 -0
- package/dist/esm/shared/utils/validators/domain.js +29 -0
- package/dist/esm/shared/utils/validators/entity.js +22 -0
- package/dist/esm/shared/utils/validators/index.js +7 -0
- package/dist/esm/shared/utils/validators/ip.js +48 -0
- package/dist/esm/shared/utils/validators/nameserver.js +44 -0
- package/dist/esm/shared/utils/validators/network.js +42 -0
- package/dist/{application → types/application}/client/RDAPClient.d.ts +10 -1
- package/dist/types/application/client/RDAPClient.d.ts.map +1 -0
- package/dist/types/application/client/index.d.ts.map +1 -0
- package/dist/types/application/deduplication/QueryDeduplicator.d.ts.map +1 -0
- package/dist/types/application/hooks/MiddlewareHooks.d.ts.map +1 -0
- package/dist/types/application/services/BatchProcessor.d.ts.map +1 -0
- package/dist/types/application/services/QueryOrchestrator.d.ts.map +1 -0
- package/dist/types/application/services/QueryPriority.d.ts.map +1 -0
- package/dist/types/application/services/index.d.ts.map +1 -0
- package/dist/{cli → types/cli}/index.d.ts.map +1 -1
- package/dist/types/core/ports/bootstrap.port.d.ts.map +1 -0
- package/dist/types/core/ports/cache.port.d.ts.map +1 -0
- package/dist/types/core/ports/fetcher.port.d.ts.map +1 -0
- package/dist/types/core/ports/index.d.ts.map +1 -0
- package/dist/types/core/ports/normalizer.port.d.ts.map +1 -0
- package/dist/types/core/ports/pii-redactor.port.d.ts.map +1 -0
- package/dist/{index.d.ts → types/index.d.ts} +6 -3
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/CacheManager.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/InMemoryCache.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/PersistentCache.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/RedisCache.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/StaleWhileRevalidateCache.d.ts +16 -0
- package/dist/types/infrastructure/cache/StaleWhileRevalidateCache.d.ts.map +1 -0
- package/dist/types/infrastructure/cache/index.d.ts.map +1 -0
- package/dist/types/infrastructure/http/AuthenticationManager.d.ts.map +1 -0
- package/dist/types/infrastructure/http/BootstrapDiscovery.d.ts.map +1 -0
- package/dist/types/infrastructure/http/BrowserFetcher.d.ts.map +1 -0
- package/dist/types/infrastructure/http/BunFetcher.d.ts.map +1 -0
- package/dist/types/infrastructure/http/CircuitBreaker.d.ts.map +1 -0
- package/dist/types/infrastructure/http/CloudflareWorkersFetcher.d.ts.map +1 -0
- package/dist/types/infrastructure/http/CompressionManager.d.ts.map +1 -0
- package/dist/types/infrastructure/http/ConnectionPool.d.ts.map +1 -0
- package/dist/types/infrastructure/http/DenoFetcher.d.ts.map +1 -0
- package/dist/types/infrastructure/http/DistributedRateLimiter.d.ts +12 -0
- package/dist/types/infrastructure/http/DistributedRateLimiter.d.ts.map +1 -0
- package/dist/{infrastructure → types/infrastructure}/http/Fetcher.d.ts +2 -0
- package/dist/types/infrastructure/http/Fetcher.d.ts.map +1 -0
- package/dist/types/infrastructure/http/Normalizer.d.ts.map +1 -0
- package/dist/types/infrastructure/http/ProxyManager.d.ts.map +1 -0
- package/dist/{infrastructure → types/infrastructure}/http/RateLimiter.d.ts +5 -0
- package/dist/types/infrastructure/http/RateLimiter.d.ts.map +1 -0
- package/dist/types/infrastructure/http/RetryStrategy.d.ts.map +1 -0
- package/dist/types/infrastructure/http/index.d.ts.map +1 -0
- package/dist/types/infrastructure/logging/AuditLogger.d.ts.map +1 -0
- package/dist/types/infrastructure/logging/Logger.d.ts.map +1 -0
- package/dist/{infrastructure → types/infrastructure}/monitoring/GrafanaDashboard.d.ts.map +1 -1
- package/dist/types/infrastructure/monitoring/MetricsCollector.d.ts.map +1 -0
- package/dist/types/infrastructure/monitoring/PrometheusExporter.d.ts.map +1 -0
- package/dist/types/infrastructure/monitoring/TelemetryExporter.d.ts.map +1 -0
- package/dist/types/infrastructure/native/NativeBackend.d.ts.map +1 -0
- package/dist/types/infrastructure/security/PIIRedactor.d.ts.map +1 -0
- package/dist/{infrastructure → types/infrastructure}/security/SSRFProtection.d.ts +1 -0
- package/dist/types/infrastructure/security/SSRFProtection.d.ts.map +1 -0
- package/dist/types/infrastructure/security/index.d.ts.map +1 -0
- package/dist/types/infrastructure/telemetry/UsageTelemetry.d.ts +13 -0
- package/dist/types/infrastructure/telemetry/UsageTelemetry.d.ts.map +1 -0
- package/dist/types/infrastructure/validation/ResponseValidator.d.ts.map +1 -0
- package/dist/types/integrations/express.d.ts.map +1 -0
- package/dist/types/integrations/graphql.d.ts.map +1 -0
- package/dist/types/integrations/nestjs.d.ts.map +1 -0
- package/dist/types/shared/constants/http.constants.d.ts.map +1 -0
- package/dist/types/shared/constants/index.d.ts.map +1 -0
- package/dist/types/shared/constants/rdap.constants.d.ts.map +1 -0
- package/dist/{shared → types/shared}/errors/base.error.d.ts +3 -0
- package/dist/types/shared/errors/base.error.d.ts.map +1 -0
- package/dist/types/shared/errors/index.d.ts.map +1 -0
- package/dist/types/shared/types/entities.d.ts.map +1 -0
- package/dist/{shared → types/shared}/types/enums.d.ts +1 -1
- package/dist/types/shared/types/enums.d.ts.map +1 -0
- package/dist/types/shared/types/errors.d.ts.map +1 -0
- package/dist/types/shared/types/generics.d.ts.map +1 -0
- package/dist/{shared → types/shared}/types/index.d.ts +1 -1
- package/dist/types/shared/types/index.d.ts.map +1 -0
- package/dist/{shared → types/shared}/types/options.d.ts +9 -0
- package/dist/types/shared/types/options.d.ts.map +1 -0
- package/dist/{shared → types/shared}/types/responses.d.ts +20 -0
- package/dist/types/shared/types/responses.d.ts.map +1 -0
- package/dist/types/shared/utils/deprecation.d.ts.map +1 -0
- package/dist/types/shared/utils/enhanced-validators.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/async.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/cache.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/format.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/http.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/index.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/object.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/runtime.d.ts.map +1 -0
- package/dist/types/shared/utils/helpers/string.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/asn.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/config-validation.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/domain.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/entity.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/index.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/ip.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/nameserver.d.ts.map +1 -0
- package/dist/types/shared/utils/validators/network.d.ts.map +1 -0
- package/package.json +29 -25
- package/dist/application/client/RDAPClient.d.ts.map +0 -1
- package/dist/application/client/RDAPClient.js.map +0 -1
- package/dist/application/client/index.d.ts.map +0 -1
- package/dist/application/client/index.js.map +0 -1
- package/dist/application/deduplication/QueryDeduplicator.d.ts.map +0 -1
- package/dist/application/deduplication/QueryDeduplicator.js.map +0 -1
- package/dist/application/hooks/MiddlewareHooks.d.ts.map +0 -1
- package/dist/application/hooks/MiddlewareHooks.js.map +0 -1
- package/dist/application/services/BatchProcessor.d.ts.map +0 -1
- package/dist/application/services/BatchProcessor.js.map +0 -1
- package/dist/application/services/QueryOrchestrator.d.ts.map +0 -1
- package/dist/application/services/QueryOrchestrator.js.map +0 -1
- package/dist/application/services/QueryPriority.d.ts.map +0 -1
- package/dist/application/services/QueryPriority.js.map +0 -1
- package/dist/application/services/index.d.ts.map +0 -1
- package/dist/application/services/index.js.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/core/ports/bootstrap.port.d.ts.map +0 -1
- package/dist/core/ports/bootstrap.port.js +0 -3
- package/dist/core/ports/bootstrap.port.js.map +0 -1
- package/dist/core/ports/cache.port.d.ts.map +0 -1
- package/dist/core/ports/cache.port.js +0 -3
- package/dist/core/ports/cache.port.js.map +0 -1
- package/dist/core/ports/fetcher.port.d.ts.map +0 -1
- package/dist/core/ports/fetcher.port.js +0 -3
- package/dist/core/ports/fetcher.port.js.map +0 -1
- package/dist/core/ports/index.d.ts.map +0 -1
- package/dist/core/ports/index.js.map +0 -1
- package/dist/core/ports/normalizer.port.d.ts.map +0 -1
- package/dist/core/ports/normalizer.port.js +0 -3
- package/dist/core/ports/normalizer.port.js.map +0 -1
- package/dist/core/ports/pii-redactor.port.d.ts.map +0 -1
- package/dist/core/ports/pii-redactor.port.js +0 -3
- package/dist/core/ports/pii-redactor.port.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infrastructure/cache/CacheManager.d.ts.map +0 -1
- package/dist/infrastructure/cache/CacheManager.js.map +0 -1
- package/dist/infrastructure/cache/InMemoryCache.d.ts.map +0 -1
- package/dist/infrastructure/cache/InMemoryCache.js.map +0 -1
- package/dist/infrastructure/cache/PersistentCache.d.ts.map +0 -1
- package/dist/infrastructure/cache/PersistentCache.js.map +0 -1
- package/dist/infrastructure/cache/RedisCache.d.ts.map +0 -1
- package/dist/infrastructure/cache/RedisCache.js.map +0 -1
- package/dist/infrastructure/cache/index.d.ts.map +0 -1
- package/dist/infrastructure/cache/index.js.map +0 -1
- package/dist/infrastructure/http/AuthenticationManager.d.ts.map +0 -1
- package/dist/infrastructure/http/AuthenticationManager.js.map +0 -1
- package/dist/infrastructure/http/BootstrapDiscovery.d.ts.map +0 -1
- package/dist/infrastructure/http/BootstrapDiscovery.js.map +0 -1
- package/dist/infrastructure/http/BrowserFetcher.d.ts.map +0 -1
- package/dist/infrastructure/http/BrowserFetcher.js.map +0 -1
- package/dist/infrastructure/http/BunFetcher.d.ts.map +0 -1
- package/dist/infrastructure/http/BunFetcher.js.map +0 -1
- package/dist/infrastructure/http/CircuitBreaker.d.ts.map +0 -1
- package/dist/infrastructure/http/CircuitBreaker.js.map +0 -1
- package/dist/infrastructure/http/CloudflareWorkersFetcher.d.ts.map +0 -1
- package/dist/infrastructure/http/CloudflareWorkersFetcher.js.map +0 -1
- package/dist/infrastructure/http/CompressionManager.d.ts.map +0 -1
- package/dist/infrastructure/http/CompressionManager.js.map +0 -1
- package/dist/infrastructure/http/ConnectionPool.d.ts.map +0 -1
- package/dist/infrastructure/http/ConnectionPool.js.map +0 -1
- package/dist/infrastructure/http/DenoFetcher.d.ts.map +0 -1
- package/dist/infrastructure/http/DenoFetcher.js.map +0 -1
- package/dist/infrastructure/http/Fetcher.d.ts.map +0 -1
- package/dist/infrastructure/http/Fetcher.js.map +0 -1
- package/dist/infrastructure/http/Normalizer.d.ts.map +0 -1
- package/dist/infrastructure/http/Normalizer.js.map +0 -1
- package/dist/infrastructure/http/ProxyManager.d.ts.map +0 -1
- package/dist/infrastructure/http/ProxyManager.js.map +0 -1
- package/dist/infrastructure/http/RateLimiter.d.ts.map +0 -1
- package/dist/infrastructure/http/RateLimiter.js.map +0 -1
- package/dist/infrastructure/http/RetryStrategy.d.ts.map +0 -1
- package/dist/infrastructure/http/RetryStrategy.js.map +0 -1
- package/dist/infrastructure/http/index.d.ts.map +0 -1
- package/dist/infrastructure/http/index.js.map +0 -1
- package/dist/infrastructure/logging/AuditLogger.d.ts.map +0 -1
- package/dist/infrastructure/logging/AuditLogger.js.map +0 -1
- package/dist/infrastructure/logging/Logger.d.ts.map +0 -1
- package/dist/infrastructure/logging/Logger.js.map +0 -1
- package/dist/infrastructure/monitoring/GrafanaDashboard.js.map +0 -1
- package/dist/infrastructure/monitoring/MetricsCollector.d.ts.map +0 -1
- package/dist/infrastructure/monitoring/MetricsCollector.js.map +0 -1
- package/dist/infrastructure/monitoring/PrometheusExporter.d.ts.map +0 -1
- package/dist/infrastructure/monitoring/PrometheusExporter.js.map +0 -1
- package/dist/infrastructure/monitoring/TelemetryExporter.d.ts.map +0 -1
- package/dist/infrastructure/monitoring/TelemetryExporter.js.map +0 -1
- package/dist/infrastructure/native/NativeBackend.d.ts.map +0 -1
- package/dist/infrastructure/native/NativeBackend.js.map +0 -1
- package/dist/infrastructure/security/PIIRedactor.d.ts.map +0 -1
- package/dist/infrastructure/security/PIIRedactor.js.map +0 -1
- package/dist/infrastructure/security/SSRFProtection.d.ts.map +0 -1
- package/dist/infrastructure/security/SSRFProtection.js.map +0 -1
- package/dist/infrastructure/security/index.d.ts.map +0 -1
- package/dist/infrastructure/security/index.js.map +0 -1
- package/dist/infrastructure/validation/ResponseValidator.d.ts.map +0 -1
- package/dist/infrastructure/validation/ResponseValidator.js.map +0 -1
- package/dist/integrations/express.d.ts.map +0 -1
- package/dist/integrations/express.js.map +0 -1
- package/dist/integrations/graphql.d.ts.map +0 -1
- package/dist/integrations/graphql.js.map +0 -1
- package/dist/integrations/nestjs.d.ts.map +0 -1
- package/dist/integrations/nestjs.js.map +0 -1
- package/dist/shared/constants/http.constants.d.ts.map +0 -1
- package/dist/shared/constants/http.constants.js.map +0 -1
- package/dist/shared/constants/index.d.ts.map +0 -1
- package/dist/shared/constants/index.js.map +0 -1
- package/dist/shared/constants/rdap.constants.d.ts.map +0 -1
- package/dist/shared/constants/rdap.constants.js.map +0 -1
- package/dist/shared/errors/base.error.d.ts.map +0 -1
- package/dist/shared/errors/base.error.js.map +0 -1
- package/dist/shared/errors/index.d.ts.map +0 -1
- package/dist/shared/errors/index.js.map +0 -1
- package/dist/shared/types/entities.d.ts.map +0 -1
- package/dist/shared/types/entities.js.map +0 -1
- package/dist/shared/types/enums.d.ts.map +0 -1
- package/dist/shared/types/enums.js.map +0 -1
- package/dist/shared/types/errors.d.ts.map +0 -1
- package/dist/shared/types/errors.js.map +0 -1
- package/dist/shared/types/generics.d.ts.map +0 -1
- package/dist/shared/types/generics.js.map +0 -1
- package/dist/shared/types/index.d.ts.map +0 -1
- package/dist/shared/types/index.js.map +0 -1
- package/dist/shared/types/options.d.ts.map +0 -1
- package/dist/shared/types/options.js.map +0 -1
- package/dist/shared/types/responses.d.ts.map +0 -1
- package/dist/shared/types/responses.js +0 -3
- package/dist/shared/types/responses.js.map +0 -1
- package/dist/shared/utils/deprecation.d.ts.map +0 -1
- package/dist/shared/utils/deprecation.js.map +0 -1
- package/dist/shared/utils/enhanced-validators.d.ts.map +0 -1
- package/dist/shared/utils/enhanced-validators.js.map +0 -1
- package/dist/shared/utils/helpers/async.d.ts.map +0 -1
- package/dist/shared/utils/helpers/async.js.map +0 -1
- package/dist/shared/utils/helpers/cache.d.ts.map +0 -1
- package/dist/shared/utils/helpers/cache.js.map +0 -1
- package/dist/shared/utils/helpers/format.d.ts.map +0 -1
- package/dist/shared/utils/helpers/format.js.map +0 -1
- package/dist/shared/utils/helpers/http.d.ts.map +0 -1
- package/dist/shared/utils/helpers/http.js.map +0 -1
- package/dist/shared/utils/helpers/index.d.ts.map +0 -1
- package/dist/shared/utils/helpers/index.js.map +0 -1
- package/dist/shared/utils/helpers/object.d.ts.map +0 -1
- package/dist/shared/utils/helpers/object.js.map +0 -1
- package/dist/shared/utils/helpers/runtime.d.ts.map +0 -1
- package/dist/shared/utils/helpers/runtime.js.map +0 -1
- package/dist/shared/utils/helpers/string.d.ts.map +0 -1
- package/dist/shared/utils/helpers/string.js.map +0 -1
- package/dist/shared/utils/validators/asn.d.ts.map +0 -1
- package/dist/shared/utils/validators/asn.js.map +0 -1
- package/dist/shared/utils/validators/config-validation.d.ts.map +0 -1
- package/dist/shared/utils/validators/config-validation.js.map +0 -1
- package/dist/shared/utils/validators/domain.d.ts.map +0 -1
- package/dist/shared/utils/validators/domain.js.map +0 -1
- package/dist/shared/utils/validators/entity.d.ts.map +0 -1
- package/dist/shared/utils/validators/entity.js.map +0 -1
- package/dist/shared/utils/validators/index.d.ts.map +0 -1
- package/dist/shared/utils/validators/index.js.map +0 -1
- package/dist/shared/utils/validators/ip.d.ts.map +0 -1
- package/dist/shared/utils/validators/ip.js.map +0 -1
- package/dist/shared/utils/validators/nameserver.d.ts.map +0 -1
- package/dist/shared/utils/validators/nameserver.js.map +0 -1
- package/dist/shared/utils/validators/network.d.ts.map +0 -1
- package/dist/shared/utils/validators/network.js.map +0 -1
- /package/dist/{application → types/application}/client/index.d.ts +0 -0
- /package/dist/{application → types/application}/deduplication/QueryDeduplicator.d.ts +0 -0
- /package/dist/{application → types/application}/hooks/MiddlewareHooks.d.ts +0 -0
- /package/dist/{application → types/application}/services/BatchProcessor.d.ts +0 -0
- /package/dist/{application → types/application}/services/QueryOrchestrator.d.ts +0 -0
- /package/dist/{application → types/application}/services/QueryPriority.d.ts +0 -0
- /package/dist/{application → types/application}/services/index.d.ts +0 -0
- /package/dist/{cli → types/cli}/index.d.ts +0 -0
- /package/dist/{core → types/core}/ports/bootstrap.port.d.ts +0 -0
- /package/dist/{core → types/core}/ports/cache.port.d.ts +0 -0
- /package/dist/{core → types/core}/ports/fetcher.port.d.ts +0 -0
- /package/dist/{core → types/core}/ports/index.d.ts +0 -0
- /package/dist/{core → types/core}/ports/normalizer.port.d.ts +0 -0
- /package/dist/{core → types/core}/ports/pii-redactor.port.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/cache/CacheManager.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/cache/InMemoryCache.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/cache/PersistentCache.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/cache/RedisCache.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/cache/index.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/AuthenticationManager.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/BootstrapDiscovery.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/BrowserFetcher.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/BunFetcher.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/CircuitBreaker.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/CloudflareWorkersFetcher.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/CompressionManager.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/ConnectionPool.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/DenoFetcher.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/Normalizer.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/ProxyManager.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/RetryStrategy.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/http/index.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/logging/AuditLogger.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/logging/Logger.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/monitoring/GrafanaDashboard.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/monitoring/MetricsCollector.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/monitoring/PrometheusExporter.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/monitoring/TelemetryExporter.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/native/NativeBackend.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/security/PIIRedactor.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/security/index.d.ts +0 -0
- /package/dist/{infrastructure → types/infrastructure}/validation/ResponseValidator.d.ts +0 -0
- /package/dist/{integrations → types/integrations}/express.d.ts +0 -0
- /package/dist/{integrations → types/integrations}/graphql.d.ts +0 -0
- /package/dist/{integrations → types/integrations}/nestjs.d.ts +0 -0
- /package/dist/{shared → types/shared}/constants/http.constants.d.ts +0 -0
- /package/dist/{shared → types/shared}/constants/index.d.ts +0 -0
- /package/dist/{shared → types/shared}/constants/rdap.constants.d.ts +0 -0
- /package/dist/{shared → types/shared}/errors/index.d.ts +0 -0
- /package/dist/{shared → types/shared}/types/entities.d.ts +0 -0
- /package/dist/{shared → types/shared}/types/errors.d.ts +0 -0
- /package/dist/{shared → types/shared}/types/generics.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/deprecation.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/enhanced-validators.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/async.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/cache.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/format.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/http.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/index.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/object.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/runtime.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/helpers/string.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/asn.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/config-validation.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/domain.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/entity.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/index.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/ip.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/nameserver.d.ts +0 -0
- /package/dist/{shared → types/shared}/utils/validators/network.d.ts +0 -0
package/README.md
CHANGED
|
@@ -397,109 +397,106 @@ RDAPify is an open source project. Get help or contribute:
|
|
|
397
397
|
|
|
398
398
|
## 🚧 Project Status
|
|
399
399
|
|
|
400
|
-
**Current Release**: v0.
|
|
401
|
-
|
|
402
|
-
### 🎉 What's New in v0.
|
|
403
|
-
|
|
404
|
-
**
|
|
405
|
-
- ✅ **
|
|
406
|
-
- ✅ **
|
|
407
|
-
- ✅ **
|
|
408
|
-
- ✅ **
|
|
409
|
-
- ✅ **
|
|
410
|
-
- ✅ **
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
- ✅ **
|
|
416
|
-
- ✅ **
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
- ✅ **
|
|
422
|
-
- ✅ **
|
|
423
|
-
- ✅ **
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
**
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
**
|
|
434
|
-
- ✅
|
|
435
|
-
- ✅
|
|
436
|
-
- ✅
|
|
437
|
-
|
|
400
|
+
**Current Release**: v0.3.0 (Alpha)
|
|
401
|
+
|
|
402
|
+
### 🎉 What's New in v0.3.0
|
|
403
|
+
|
|
404
|
+
**Streaming, Monitoring & Runtime Maturity**
|
|
405
|
+
- ✅ **Streaming Batch API**: `client.streamBatch(queries[])` — `AsyncIterable<QueryResult>` with back-pressure (no overflow at 1000+ queries)
|
|
406
|
+
- ✅ **Prometheus Exporter**: `PrometheusExporter` class with `createHttpHandler()` for metrics scraping
|
|
407
|
+
- ✅ **Grafana Dashboard**: Built-in `RDAPIFY_GRAFANA_DASHBOARD` JSON template — import directly into Grafana
|
|
408
|
+
- ✅ **OpenTelemetry Traces**: `TelemetryExporter` + `ClientConfig.telemetry.endpoint` for distributed tracing
|
|
409
|
+
- ✅ **Multi-region Bootstrap**: `ClientConfig.bootstrap.regions: ['us', 'eu', 'ap']` — auto-selects nearest IANA mirror
|
|
410
|
+
- ✅ **Deprecation Engine**: `deprecated()` utility — runtime warning via `process.emitWarning`, emitted once per code path
|
|
411
|
+
- ✅ **BrowserFetcher**: Full browser-compatible fetcher for proxy-based browser environments
|
|
412
|
+
|
|
413
|
+
### v0.2.3 — Framework Integrations
|
|
414
|
+
|
|
415
|
+
- ✅ **GraphQL Schema**: framework-agnostic `{ typeDefs, resolvers }` — works with graphql-yoga and any GraphQL server
|
|
416
|
+
- ✅ **Express Middleware**: `rdapifyExpress(client)` — `GET /domain/:name`, `/ip/:address`, `/asn/:number`
|
|
417
|
+
- ✅ **NestJS Module**: `RdapifyModule.forRoot(config)` + `@InjectRdapClient()` decorator
|
|
418
|
+
|
|
419
|
+
### v0.2.2 — Edge Runtime Support
|
|
420
|
+
|
|
421
|
+
- ✅ **Deno Support**: `DenoFetcher` with `isDeno()` runtime detection
|
|
422
|
+
- ✅ **Cloudflare Workers**: `CloudflareWorkersFetcher` — no `fs` or `process` dependencies; edge-compatible
|
|
423
|
+
- ✅ **Package exports**: `./worker`, `./deno`, `./node` entry points
|
|
424
|
+
|
|
425
|
+
### v0.2.1 — Bun Runtime
|
|
426
|
+
|
|
427
|
+
- ✅ **BunFetcher**: `BunFetcher implements IFetcherPort` — uses `Bun.fetch`; auto-selected when Bun is detected
|
|
428
|
+
- ✅ **CI**: Bun job added to `.github/workflows/ci.yml`
|
|
429
|
+
|
|
430
|
+
### v0.2.0 — Core Enhancements
|
|
431
|
+
|
|
432
|
+
- ✅ **Circuit Breaker**: complete `closed → open → half-open → closed/open` state machine
|
|
433
|
+
- ✅ **Redis Pipeline**: batch `getMany`/`setMany` + SHA-256 key compression for long keys
|
|
434
|
+
- ✅ **Middleware `ctx.abort()`**: `beforeQuery` hooks can now abort queries (`QueryAbortedError`)
|
|
435
|
+
- ✅ **Middleware Priority**: numeric priority ordering (lower = higher priority)
|
|
436
|
+
- ✅ **HTTP/2 Support**: opt-in via `ClientConfig.http2: boolean`
|
|
437
|
+
|
|
438
|
+
### v0.1.9 — Availability & Bootstrap
|
|
439
|
+
|
|
440
|
+
- ✅ **Domain Availability**: `client.checkAvailability(domain)` — RDAP-only, returns `{ available, expiresAt? }`
|
|
441
|
+
- ✅ **Bulk Availability**: `client.checkAvailabilityBatch(domains[])` — concurrent batch
|
|
442
|
+
- ✅ **Live Integration Tests**: opt-in `npm run test:live` via `LIVE_TESTS=1` (weekly CI workflow, does not block merge)
|
|
443
|
+
- ✅ **Advanced Bootstrap Config**: `customServers`, `ttl` override, `fallback` to IANA
|
|
444
|
+
|
|
445
|
+
**Previous Releases (v0.1.0–v0.1.8)**
|
|
446
|
+
- ✅ Rust native backend (`rdapify-nd`), CLI tool, nameserver/entity queries, TypeScript strict mode
|
|
447
|
+
- ✅ Redis cache, middleware hooks, query deduplication, audit logger, RFC 7483 response validation
|
|
448
|
+
- ✅ Authentication (Basic/Bearer/API Key/OAuth2), proxy (HTTP/HTTPS/SOCKS4/SOCKS5), compression
|
|
449
|
+
- ✅ Retry strategies, circuit breaker, query prioritization, connection pooling, metrics & monitoring
|
|
438
450
|
|
|
439
451
|
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
|
440
452
|
|
|
441
|
-
### ✅ Full Feature Set (v0.
|
|
453
|
+
### ✅ Full Feature Set (v0.3.0)
|
|
442
454
|
|
|
443
455
|
- ✅ **RDAP Client**: Domain, IP, ASN, Nameserver, and Entity queries with automatic IANA bootstrap discovery
|
|
444
|
-
- ✅ **
|
|
456
|
+
- ✅ **Domain Availability**: `client.checkAvailability()` + `client.checkAvailabilityBatch()` via RDAP
|
|
457
|
+
- ✅ **CLI Tool**: `rdapify domain/ip/asn/nameserver/entity` with `--json`, `--no-cache`, `--timeout`, `--server` flags
|
|
445
458
|
- ✅ **SSRF Protection**: Blocks private IPs, localhost, link-local, CIDR matching (IPv4/IPv6)
|
|
446
459
|
- ✅ **Data Normalization**: Consistent response format across all registries
|
|
447
460
|
- ✅ **PII Redaction**: Automatic redaction of emails, phones, addresses (GDPR/CCPA)
|
|
448
461
|
- ✅ **Audit Logging**: Compliance-grade audit trail (GDPR/SOC2/CCPA) with NDJSON file adapter
|
|
449
462
|
- ✅ **In-Memory Cache**: LRU cache with TTL support
|
|
450
463
|
- ✅ **Persistent Cache**: File-based cache that survives restarts
|
|
451
|
-
- ✅ **Redis Cache**: Production-ready Redis adapter
|
|
464
|
+
- ✅ **Redis Cache**: Production-ready Redis adapter with pipeline + key compression
|
|
452
465
|
- ✅ **Connection Pooling**: HTTP connection reuse (30-40% faster)
|
|
453
466
|
- ✅ **Metrics & Monitoring**: Comprehensive query tracking and analysis
|
|
467
|
+
- ✅ **Prometheus Exporter**: `PrometheusExporter` + `createHttpHandler()` for metrics scraping
|
|
468
|
+
- ✅ **Grafana Dashboard**: Built-in JSON dashboard template
|
|
469
|
+
- ✅ **OpenTelemetry Traces**: Distributed tracing via `TelemetryExporter`
|
|
454
470
|
- ✅ **Request/Response Logging**: Structured logging with configurable levels
|
|
455
471
|
- ✅ **Retry Strategies**: Circuit breaker (closed/open/half-open) with exponential backoff
|
|
456
472
|
- ✅ **Query Prioritization**: High/normal/low priority queue
|
|
457
473
|
- ✅ **Query Deduplication**: Collapse concurrent identical requests into one
|
|
458
|
-
- ✅ **Middleware Hooks**: Lifecycle hooks
|
|
474
|
+
- ✅ **Middleware Hooks**: Lifecycle hooks with `ctx.abort()` support and priority ordering
|
|
459
475
|
- ✅ **Response Validation**: RFC 7483 schema validation
|
|
460
476
|
- ✅ **Enhanced Validation**: IDN domains, IPv6 zones, ASN ranges
|
|
461
477
|
- ✅ **Authentication**: Basic, Bearer, API Key, OAuth2
|
|
462
478
|
- ✅ **Proxy Support**: HTTP/HTTPS/SOCKS4/SOCKS5 with bypass patterns
|
|
463
479
|
- ✅ **Response Compression**: gzip, brotli, deflate (60-80% bandwidth reduction)
|
|
464
|
-
- ✅ **
|
|
465
|
-
- ✅ **
|
|
480
|
+
- ✅ **HTTP/2 Support**: opt-in via `ClientConfig.http2: boolean`
|
|
481
|
+
- ✅ **Streaming API**: `client.streamBatch()` — `AsyncIterable<QueryResult>` with back-pressure
|
|
482
|
+
- ✅ **Multi-region Bootstrap**: `ClientConfig.bootstrap.regions` — nearest IANA mirror selection
|
|
483
|
+
- ✅ **GraphQL Schema**: framework-agnostic `{ typeDefs, resolvers }` for graphql-yoga and others
|
|
484
|
+
- ✅ **Express Middleware**: `rdapifyExpress(client)` — drop-in REST routes
|
|
485
|
+
- ✅ **NestJS Module**: `RdapifyModule.forRoot(config)` + `@InjectRdapClient()` decorator
|
|
486
|
+
- ✅ **Rust Native Backend**: optional `rdapify-nd` (`backend: 'auto' | 'native' | 'typescript'`)
|
|
487
|
+
- ✅ **Multi-runtime**: Node.js 20+, Bun (`BunFetcher`), Deno (`DenoFetcher`), Cloudflare Workers (`CloudflareWorkersFetcher`), Browser (`BrowserFetcher`)
|
|
488
|
+
- ✅ **Deprecation Engine**: runtime warnings via `process.emitWarning`, once per code path
|
|
466
489
|
- ✅ **TypeScript Strict**: Full type definitions with strict mode
|
|
467
|
-
- ✅ **Test Coverage**:
|
|
468
|
-
|
|
469
|
-
### 🎉 What's New in v0.1.8
|
|
490
|
+
- ✅ **Test Coverage**: 1066+ tests (unit + integration + security), 90.4% branch coverage
|
|
470
491
|
|
|
471
|
-
|
|
472
|
-
- ✅ **Optional native backend**: install `rdapify-nd` alongside `rdapify` for lower-latency queries powered by compiled Rust
|
|
473
|
-
- ✅ **`backend` option**: `'auto'` (default, uses native if available), `'native'` (require native), `'typescript'` (always use TS pipeline)
|
|
474
|
-
- ✅ **`isNativeAvailable()`**: runtime detection utility to check if native binary is loaded
|
|
475
|
-
- ✅ **Transparent fallback**: when `rdapify-nd` is absent, all existing behaviour is preserved with zero configuration change
|
|
492
|
+
### 🔜 Coming in v1.0.0-rc.1
|
|
476
493
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const client = new RDAPClient({ backend: 'auto' }); // transparent
|
|
483
|
-
const client2 = new RDAPClient({ backend: 'native' }); // throws if not installed
|
|
484
|
-
const client3 = new RDAPClient({ backend: 'typescript' }); // always TS pipeline
|
|
485
|
-
```
|
|
494
|
+
- ⏳ **API Freeze**: all public exports locked — no breaking changes after this point
|
|
495
|
+
- ⏳ **External Security Audit**: independent audit firm review of rdapify + rdapify-rust
|
|
496
|
+
- ⏳ **Runtime Certification**: Bun, Deno, and Cloudflare Workers verified in live environments
|
|
497
|
+
- ⏳ **RC Feedback Period**: 4-week community feedback window before stable release
|
|
486
498
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
- ⏳ **Domain Availability**: `client.checkAvailability('example.com')` — instant availability check via RDAP
|
|
490
|
-
- ⏳ **Bulk Availability**: `client.checkAvailabilityBatch(['a.com', 'b.com'])` — check multiple domains at once
|
|
491
|
-
- ⏳ **Live Integration Tests**: opt-in via `LIVE_TESTS=1` against real RDAP servers
|
|
492
|
-
- ⏳ **Advanced Bootstrap Config**: custom bootstrap servers, TTL overrides, redundancy fallback
|
|
493
|
-
|
|
494
|
-
### 📋 Roadmap to v0.2.0
|
|
495
|
-
|
|
496
|
-
- RDAP Testing CLI (`rdapify test server`, `rdapify test benchmark`)
|
|
497
|
-
- RDAP Extensions Registry (REGEXT support)
|
|
498
|
-
- Bootstrap Store Adapters (File, Redis, Database)
|
|
499
|
-
- Advanced Reporting (`client.generateReport()`)
|
|
500
|
-
- RFC 9083 / RFC 9535 support
|
|
501
|
-
|
|
502
|
-
See [ROADMAP.md](ROADMAP.md) for the complete roadmap and [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
|
499
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
|
503
500
|
|
|
504
501
|
## 🏗️ Code Architecture
|
|
505
502
|
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.RDAPClient = void 0;
|
|
4
37
|
const cache_1 = require("../../infrastructure/cache");
|
|
@@ -13,6 +46,8 @@ const security_1 = require("../../infrastructure/security");
|
|
|
13
46
|
const MetricsCollector_1 = require("../../infrastructure/monitoring/MetricsCollector");
|
|
14
47
|
const Logger_1 = require("../../infrastructure/logging/Logger");
|
|
15
48
|
const errors_1 = require("../../shared/errors");
|
|
49
|
+
const UsageTelemetry_1 = require("../../infrastructure/telemetry/UsageTelemetry");
|
|
50
|
+
const validators_1 = require("../../shared/utils/validators");
|
|
16
51
|
const options_1 = require("../../shared/types/options");
|
|
17
52
|
const helpers_1 = require("../../shared/utils/helpers");
|
|
18
53
|
const services_1 = require("../services");
|
|
@@ -69,6 +104,7 @@ class RDAPClient {
|
|
|
69
104
|
maxRedirects: this.options.maxRedirects,
|
|
70
105
|
ssrfProtection: this.ssrfProtection,
|
|
71
106
|
http2: this.options.http2,
|
|
107
|
+
signal: this.options.signal,
|
|
72
108
|
logRedirect: (fromUrl, toUrl) => {
|
|
73
109
|
this.logger?.warn(`Redirect: ${fromUrl} → ${toUrl}`);
|
|
74
110
|
if (this.debugEnabled && this.debugLogger) {
|
|
@@ -155,27 +191,37 @@ class RDAPClient {
|
|
|
155
191
|
async domain(domain) {
|
|
156
192
|
if (this.nativeBackend)
|
|
157
193
|
return this.nativeBackend.domain(domain);
|
|
158
|
-
|
|
194
|
+
const result = await this.orchestrator.queryDomain(domain);
|
|
195
|
+
this.pingTelemetry('domain');
|
|
196
|
+
return result;
|
|
159
197
|
}
|
|
160
198
|
async ip(ip) {
|
|
161
199
|
if (this.nativeBackend)
|
|
162
200
|
return this.nativeBackend.ip(ip);
|
|
163
|
-
|
|
201
|
+
const result = await this.orchestrator.queryIP(ip);
|
|
202
|
+
this.pingTelemetry('ip');
|
|
203
|
+
return result;
|
|
164
204
|
}
|
|
165
205
|
async asn(asn) {
|
|
166
206
|
if (this.nativeBackend)
|
|
167
207
|
return this.nativeBackend.asn(asn);
|
|
168
|
-
|
|
208
|
+
const result = await this.orchestrator.queryASN(asn);
|
|
209
|
+
this.pingTelemetry('asn');
|
|
210
|
+
return result;
|
|
169
211
|
}
|
|
170
212
|
async nameserver(nameserver) {
|
|
171
213
|
if (this.nativeBackend)
|
|
172
214
|
return this.nativeBackend.nameserver(nameserver);
|
|
173
|
-
|
|
215
|
+
const result = await this.orchestrator.queryNameserver(nameserver);
|
|
216
|
+
this.pingTelemetry('nameserver');
|
|
217
|
+
return result;
|
|
174
218
|
}
|
|
175
219
|
async entity(handle, serverUrl) {
|
|
176
220
|
if (this.nativeBackend)
|
|
177
221
|
return this.nativeBackend.entity(handle, serverUrl);
|
|
178
|
-
|
|
222
|
+
const result = await this.orchestrator.queryEntity(handle, serverUrl);
|
|
223
|
+
this.pingTelemetry('entity');
|
|
224
|
+
return result;
|
|
179
225
|
}
|
|
180
226
|
async checkAvailability(domain) {
|
|
181
227
|
try {
|
|
@@ -198,6 +244,125 @@ class RDAPClient {
|
|
|
198
244
|
}));
|
|
199
245
|
return new Map(entries);
|
|
200
246
|
}
|
|
247
|
+
async searchDomains(pattern, serverUrl) {
|
|
248
|
+
const server = serverUrl ?? (await this.bootstrap.discoverDomain('example.com'));
|
|
249
|
+
const url = `${server}/domains?name=${encodeURIComponent(pattern)}`;
|
|
250
|
+
let raw;
|
|
251
|
+
try {
|
|
252
|
+
raw = await this.fetchWithRetry(url);
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
if (error instanceof errors_1.RDAPServerError &&
|
|
256
|
+
(error.statusCode === 404 || error.statusCode === 501)) {
|
|
257
|
+
throw new errors_1.SearchNotSupportedError(`RDAP server does not support domain search: ${server}`, { pattern, serverUrl: server });
|
|
258
|
+
}
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
const domainSearchResults = raw['domainSearchResults'] ?? [];
|
|
262
|
+
const results = domainSearchResults.map((item) => this.normalizer.normalize(item, pattern, server, false, this.options.includeRaw));
|
|
263
|
+
return { results, totalCount: results.length, query: pattern };
|
|
264
|
+
}
|
|
265
|
+
async searchEntities(pattern, serverUrl) {
|
|
266
|
+
if (!serverUrl) {
|
|
267
|
+
throw new errors_1.SearchNotSupportedError('searchEntities requires an explicit serverUrl — there is no global bootstrap for entities', { pattern });
|
|
268
|
+
}
|
|
269
|
+
const url = `${serverUrl}/entities?fn=${encodeURIComponent(pattern)}`;
|
|
270
|
+
let raw;
|
|
271
|
+
try {
|
|
272
|
+
raw = await this.fetchWithRetry(url);
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
if (error instanceof errors_1.RDAPServerError &&
|
|
276
|
+
(error.statusCode === 404 || error.statusCode === 501)) {
|
|
277
|
+
throw new errors_1.SearchNotSupportedError(`RDAP server does not support entity search: ${serverUrl}`, { pattern, serverUrl });
|
|
278
|
+
}
|
|
279
|
+
throw error;
|
|
280
|
+
}
|
|
281
|
+
const entitySearchResults = raw['entitySearchResults'] ?? [];
|
|
282
|
+
const results = entitySearchResults.map((item) => this.normalizer.normalize(item, pattern, serverUrl, false, this.options.includeRaw));
|
|
283
|
+
return { results, totalCount: results.length, query: pattern };
|
|
284
|
+
}
|
|
285
|
+
async explain(query) {
|
|
286
|
+
const startTime = Date.now();
|
|
287
|
+
let queryType = 'domain';
|
|
288
|
+
let detectedType = 'unknown';
|
|
289
|
+
try {
|
|
290
|
+
if (/^\d+$/.test(query) || /^AS\d+$/i.test(query)) {
|
|
291
|
+
(0, validators_1.validateASN)(query);
|
|
292
|
+
queryType = 'asn';
|
|
293
|
+
detectedType = 'asn';
|
|
294
|
+
}
|
|
295
|
+
else if (query.includes('.') && /^\d/.test(query)) {
|
|
296
|
+
(0, validators_1.validateIP)(query);
|
|
297
|
+
queryType = 'ip';
|
|
298
|
+
detectedType = 'ipv4';
|
|
299
|
+
}
|
|
300
|
+
else if (query.includes(':')) {
|
|
301
|
+
(0, validators_1.validateIP)(query);
|
|
302
|
+
queryType = 'ip';
|
|
303
|
+
detectedType = 'ipv6';
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
(0, validators_1.validateDomain)(query);
|
|
307
|
+
queryType = 'domain';
|
|
308
|
+
detectedType = 'domain';
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
catch {
|
|
312
|
+
queryType = 'domain';
|
|
313
|
+
detectedType = 'unknown';
|
|
314
|
+
}
|
|
315
|
+
const cacheEnabled = this.options.cache !== false;
|
|
316
|
+
let cacheStatus = cacheEnabled ? 'miss' : 'disabled';
|
|
317
|
+
if (cacheEnabled) {
|
|
318
|
+
const { generateCacheKey } = await Promise.resolve().then(() => __importStar(require('../../shared/utils/helpers')));
|
|
319
|
+
const cacheKey = generateCacheKey(queryType, query.toLowerCase());
|
|
320
|
+
const cached = await this.cache.get(cacheKey);
|
|
321
|
+
if (cached)
|
|
322
|
+
cacheStatus = 'hit';
|
|
323
|
+
}
|
|
324
|
+
let bootstrapServer = null;
|
|
325
|
+
let builtUrl = null;
|
|
326
|
+
let error;
|
|
327
|
+
try {
|
|
328
|
+
if (queryType === 'domain') {
|
|
329
|
+
bootstrapServer = await this.bootstrap.discoverDomain(query.toLowerCase());
|
|
330
|
+
builtUrl = `${bootstrapServer}/domain/${query.toLowerCase()}`;
|
|
331
|
+
}
|
|
332
|
+
else if (queryType === 'ip') {
|
|
333
|
+
const version = (0, validators_1.validateIP)(query);
|
|
334
|
+
bootstrapServer =
|
|
335
|
+
version === 'v4'
|
|
336
|
+
? await this.bootstrap.discoverIPv4(query)
|
|
337
|
+
: await this.bootstrap.discoverIPv6(query);
|
|
338
|
+
builtUrl = `${bootstrapServer}/ip/${query}`;
|
|
339
|
+
}
|
|
340
|
+
else if (queryType === 'asn') {
|
|
341
|
+
const asnNum = (0, validators_1.validateASN)(query);
|
|
342
|
+
bootstrapServer = await this.bootstrap.discoverASN(asnNum);
|
|
343
|
+
builtUrl = `${bootstrapServer}/autnum/${asnNum}`;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
catch (err) {
|
|
347
|
+
error = err instanceof Error ? err.message : String(err);
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
query,
|
|
351
|
+
queryType,
|
|
352
|
+
detectedType,
|
|
353
|
+
bootstrapServer,
|
|
354
|
+
builtUrl,
|
|
355
|
+
cacheStatus,
|
|
356
|
+
latencyMs: Date.now() - startTime,
|
|
357
|
+
error,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
pingTelemetry(queryType) {
|
|
361
|
+
const telemetryOpts = this.options.usageTelemetry;
|
|
362
|
+
if (telemetryOpts?.enabled === true) {
|
|
363
|
+
UsageTelemetry_1.UsageTelemetry.ping(queryType, telemetryOpts.endpoint);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
201
366
|
async fetchWithRetry(url) {
|
|
202
367
|
const retryOptions = typeof this.options.retry === 'boolean'
|
|
203
368
|
? this.options.retry
|
|
@@ -226,6 +391,33 @@ class RDAPClient {
|
|
|
226
391
|
normalizeOptions(options) {
|
|
227
392
|
return (0, helpers_1.deepMerge)(options_1.DEFAULT_OPTIONS, options);
|
|
228
393
|
}
|
|
394
|
+
async validate() {
|
|
395
|
+
const errors = [];
|
|
396
|
+
const warnings = [];
|
|
397
|
+
const bootstrapUrl = this.options.bootstrapUrl;
|
|
398
|
+
if (bootstrapUrl && bootstrapUrl !== 'https://data.iana.org/rdap') {
|
|
399
|
+
try {
|
|
400
|
+
await this.fetcher.fetch(`${bootstrapUrl}/dns.json`);
|
|
401
|
+
}
|
|
402
|
+
catch {
|
|
403
|
+
errors.push(`Bootstrap URL unreachable: ${bootstrapUrl}`);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
const cacheOpts = this.options.cache;
|
|
407
|
+
if (cacheOpts?.strategy === 'redis' && cacheOpts?.redisClient) {
|
|
408
|
+
try {
|
|
409
|
+
await cacheOpts.redisClient.ping();
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
errors.push('Redis connection failed');
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
const ssrfOpts = this.options.ssrfProtection;
|
|
416
|
+
if (ssrfOpts?.enabled === false) {
|
|
417
|
+
warnings.push('SSRF protection disabled — not safe for production');
|
|
418
|
+
}
|
|
419
|
+
return { valid: errors.length === 0, errors, warnings };
|
|
420
|
+
}
|
|
229
421
|
async clearCache() {
|
|
230
422
|
await this.cache.clear();
|
|
231
423
|
this.bootstrap.clearCache();
|
|
@@ -282,4 +474,3 @@ class RDAPClient {
|
|
|
282
474
|
}
|
|
283
475
|
}
|
|
284
476
|
exports.RDAPClient = RDAPClient;
|
|
285
|
-
//# sourceMappingURL=RDAPClient.js.map
|
|
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RDAPClient = void 0;
|
|
4
4
|
var RDAPClient_1 = require("./RDAPClient");
|
|
5
5
|
Object.defineProperty(exports, "RDAPClient", { enumerable: true, get: function () { return RDAPClient_1.RDAPClient; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -5,4 +5,3 @@ var QueryOrchestrator_1 = require("./QueryOrchestrator");
|
|
|
5
5
|
Object.defineProperty(exports, "QueryOrchestrator", { enumerable: true, get: function () { return QueryOrchestrator_1.QueryOrchestrator; } });
|
|
6
6
|
var BatchProcessor_1 = require("./BatchProcessor");
|
|
7
7
|
Object.defineProperty(exports, "BatchProcessor", { enumerable: true, get: function () { return BatchProcessor_1.BatchProcessor; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -6,4 +6,3 @@ tslib_1.__exportStar(require("./fetcher.port"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./normalizer.port"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./bootstrap.port"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./pii-redactor.port"), exports);
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deprecated = exports.RDAPIFY_GRAFANA_DASHBOARD = exports.TelemetryExporter = exports.PrometheusExporter = exports.RDAPIFY_CLIENT_TOKEN = exports.InjectRdapClient = exports.RdapifyModule = exports.MinimalRouter = exports.rdapifyExpress = exports.RDAPIFY_TYPE_DEFS = exports.createRdapifySchema = exports.BrowserFetcher = exports.CloudflareWorkersFetcher = exports.DenoFetcher = exports.BunFetcher = exports.QueryAbortedError = exports.CircuitOpenError = exports.CircuitBreaker = exports.isNativeAvailable = exports.getRuntimeName = exports.isCloudflareWorkers = exports.isBun = exports.isDeno = exports.isBrowser = exports.isNode = exports.ResponseValidator = exports.FileAuditAdapter = exports.InMemoryAuditAdapter = exports.AuditLogger = exports.QueryDeduplicator = exports.MiddlewareManager = exports.RedisCache = void 0;
|
|
3
|
+
exports.asciiToIdn = exports.idnToAscii = exports.isPunycodeDomain = exports.isIdnDomain = exports.validateAsnRange = exports.validateIpv6WithZone = exports.validateIdnDomain = exports.PersistentCache = exports.QueryPriorityQueue = exports.RetryStrategy = exports.Logger = exports.MetricsCollector = exports.ConnectionPool = exports.DistributedRateLimiter = exports.RateLimiter = exports.BatchProcessor = exports.VERSION = exports.UsageTelemetry = exports.normalizeEntityHandle = exports.normalizeNameserver = exports.normalizeASN = exports.normalizeIP = exports.normalizeDomain = exports.isLinkLocal = exports.isLocalhost = exports.isPrivateIP = exports.validateEntityHandle = exports.validateNameserver = exports.validateASN = exports.validateIPv6 = exports.validateIPv4 = exports.validateIP = exports.validateDomain = exports.isRateLimitError = exports.isTimeoutError = exports.isNetworkError = exports.isSSRFProtectionError = exports.isRDAPifyError = exports.SearchNotSupportedError = exports.RateLimitError = exports.CacheError = exports.ParseError = exports.ValidationError = exports.NoServerFoundError = exports.RDAPServerError = exports.TimeoutError = exports.NetworkError = exports.SSRFProtectionError = exports.RDAPifyError = exports.RDAPClient = void 0;
|
|
4
|
+
exports.deprecated = exports.RDAPIFY_GRAFANA_DASHBOARD = exports.TelemetryExporter = exports.PrometheusExporter = exports.RDAPIFY_CLIENT_TOKEN = exports.InjectRdapClient = exports.RdapifyModule = exports.MinimalRouter = exports.rdapifyExpress = exports.RDAPIFY_TYPE_DEFS = exports.createRdapifySchema = exports.BrowserFetcher = exports.CloudflareWorkersFetcher = exports.DenoFetcher = exports.BunFetcher = exports.QueryAbortedError = exports.CircuitOpenError = exports.CircuitBreaker = exports.isNativeAvailable = exports.getRuntimeName = exports.isCloudflareWorkers = exports.isBun = exports.isDeno = exports.isBrowser = exports.isNode = exports.ResponseValidator = exports.FileAuditAdapter = exports.InMemoryAuditAdapter = exports.AuditLogger = exports.QueryDeduplicator = exports.MiddlewareManager = exports.RedisCache = exports.CompressionManager = exports.ProxyManager = exports.AuthenticationManager = void 0;
|
|
5
5
|
var client_1 = require("./application/client");
|
|
6
6
|
Object.defineProperty(exports, "RDAPClient", { enumerable: true, get: function () { return client_1.RDAPClient; } });
|
|
7
7
|
var errors_1 = require("./shared/errors");
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "ValidationError", { enumerable: true, get: funct
|
|
|
15
15
|
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_1.ParseError; } });
|
|
16
16
|
Object.defineProperty(exports, "CacheError", { enumerable: true, get: function () { return errors_1.CacheError; } });
|
|
17
17
|
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } });
|
|
18
|
+
Object.defineProperty(exports, "SearchNotSupportedError", { enumerable: true, get: function () { return errors_1.SearchNotSupportedError; } });
|
|
18
19
|
Object.defineProperty(exports, "isRDAPifyError", { enumerable: true, get: function () { return errors_1.isRDAPifyError; } });
|
|
19
20
|
Object.defineProperty(exports, "isSSRFProtectionError", { enumerable: true, get: function () { return errors_1.isSSRFProtectionError; } });
|
|
20
21
|
Object.defineProperty(exports, "isNetworkError", { enumerable: true, get: function () { return errors_1.isNetworkError; } });
|
|
@@ -36,11 +37,15 @@ Object.defineProperty(exports, "normalizeIP", { enumerable: true, get: function
|
|
|
36
37
|
Object.defineProperty(exports, "normalizeASN", { enumerable: true, get: function () { return validators_1.normalizeASN; } });
|
|
37
38
|
Object.defineProperty(exports, "normalizeNameserver", { enumerable: true, get: function () { return validators_1.normalizeNameserver; } });
|
|
38
39
|
Object.defineProperty(exports, "normalizeEntityHandle", { enumerable: true, get: function () { return validators_1.normalizeEntityHandle; } });
|
|
39
|
-
|
|
40
|
+
var UsageTelemetry_1 = require("./infrastructure/telemetry/UsageTelemetry");
|
|
41
|
+
Object.defineProperty(exports, "UsageTelemetry", { enumerable: true, get: function () { return UsageTelemetry_1.UsageTelemetry; } });
|
|
42
|
+
exports.VERSION = '0.3.1';
|
|
40
43
|
var BatchProcessor_1 = require("./application/services/BatchProcessor");
|
|
41
44
|
Object.defineProperty(exports, "BatchProcessor", { enumerable: true, get: function () { return BatchProcessor_1.BatchProcessor; } });
|
|
42
45
|
var RateLimiter_1 = require("./infrastructure/http/RateLimiter");
|
|
43
46
|
Object.defineProperty(exports, "RateLimiter", { enumerable: true, get: function () { return RateLimiter_1.RateLimiter; } });
|
|
47
|
+
var DistributedRateLimiter_1 = require("./infrastructure/http/DistributedRateLimiter");
|
|
48
|
+
Object.defineProperty(exports, "DistributedRateLimiter", { enumerable: true, get: function () { return DistributedRateLimiter_1.DistributedRateLimiter; } });
|
|
44
49
|
var ConnectionPool_1 = require("./infrastructure/http/ConnectionPool");
|
|
45
50
|
Object.defineProperty(exports, "ConnectionPool", { enumerable: true, get: function () { return ConnectionPool_1.ConnectionPool; } });
|
|
46
51
|
var MetricsCollector_1 = require("./infrastructure/monitoring/MetricsCollector");
|
|
@@ -121,4 +126,3 @@ var deprecation_1 = require("./shared/utils/deprecation");
|
|
|
121
126
|
Object.defineProperty(exports, "deprecated", { enumerable: true, get: function () { return deprecation_1.deprecated; } });
|
|
122
127
|
const client_2 = require("./application/client");
|
|
123
128
|
exports.default = client_2.RDAPClient;
|
|
124
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -4,6 +4,7 @@ exports.CacheManager = void 0;
|
|
|
4
4
|
const errors_1 = require("../../shared/errors");
|
|
5
5
|
const InMemoryCache_1 = require("./InMemoryCache");
|
|
6
6
|
const RedisCache_1 = require("./RedisCache");
|
|
7
|
+
const StaleWhileRevalidateCache_1 = require("./StaleWhileRevalidateCache");
|
|
7
8
|
class CacheManager {
|
|
8
9
|
constructor(options = {}) {
|
|
9
10
|
this.ttl = options.ttl || 3600;
|
|
@@ -30,6 +31,9 @@ class CacheManager {
|
|
|
30
31
|
case 'none':
|
|
31
32
|
this.cache = new NoOpCache();
|
|
32
33
|
break;
|
|
34
|
+
case 'stale-while-revalidate':
|
|
35
|
+
this.cache = new StaleWhileRevalidateCache_1.StaleWhileRevalidateCache(options.maxSize || 1000, options.revalidateCallback);
|
|
36
|
+
break;
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
async get(key) {
|
|
@@ -121,4 +125,3 @@ class NoOpCache {
|
|
|
121
125
|
return 0;
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
|
-
//# sourceMappingURL=CacheManager.js.map
|