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
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export class MetricsCollector {
|
|
2
|
+
constructor(options = {}) {
|
|
3
|
+
this.metrics = [];
|
|
4
|
+
this.enabled = options.enabled ?? true;
|
|
5
|
+
this.maxMetrics = options.maxMetrics || 10000;
|
|
6
|
+
}
|
|
7
|
+
record(metric) {
|
|
8
|
+
if (!this.enabled)
|
|
9
|
+
return;
|
|
10
|
+
this.metrics.push(metric);
|
|
11
|
+
if (this.metrics.length > this.maxMetrics) {
|
|
12
|
+
this.metrics = this.metrics.slice(-this.maxMetrics);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
calculatePercentile(sorted, p) {
|
|
16
|
+
if (sorted.length === 0)
|
|
17
|
+
return 0;
|
|
18
|
+
if (sorted.length === 1)
|
|
19
|
+
return sorted[0];
|
|
20
|
+
const index = p * (sorted.length - 1);
|
|
21
|
+
const lower = Math.floor(index);
|
|
22
|
+
const upper = Math.ceil(index);
|
|
23
|
+
const fraction = index - lower;
|
|
24
|
+
const lowerVal = sorted[lower] ?? 0;
|
|
25
|
+
const upperVal = sorted[upper] ?? 0;
|
|
26
|
+
return lowerVal + fraction * (upperVal - lowerVal);
|
|
27
|
+
}
|
|
28
|
+
getSummary(since) {
|
|
29
|
+
const relevantMetrics = since
|
|
30
|
+
? this.metrics.filter((m) => m.timestamp >= since)
|
|
31
|
+
: this.metrics;
|
|
32
|
+
if (relevantMetrics.length === 0) {
|
|
33
|
+
return this.getEmptySummary();
|
|
34
|
+
}
|
|
35
|
+
const successful = relevantMetrics.filter((m) => m.success).length;
|
|
36
|
+
const failed = relevantMetrics.length - successful;
|
|
37
|
+
const cached = relevantMetrics.filter((m) => m.cached).length;
|
|
38
|
+
const durations = relevantMetrics.map((m) => m.duration);
|
|
39
|
+
const totalDuration = durations.reduce((a, b) => a + b, 0);
|
|
40
|
+
const avgResponseTime = durations.length > 0 ? totalDuration / durations.length : 0;
|
|
41
|
+
const minResponseTime = durations.length > 0 ? Math.min(...durations) : 0;
|
|
42
|
+
const maxResponseTime = durations.length > 0 ? Math.max(...durations) : 0;
|
|
43
|
+
const sorted = [...durations].sort((a, b) => a - b);
|
|
44
|
+
const p50ResponseTime = this.calculatePercentile(sorted, 0.5);
|
|
45
|
+
const p90ResponseTime = this.calculatePercentile(sorted, 0.9);
|
|
46
|
+
const p99ResponseTime = this.calculatePercentile(sorted, 0.99);
|
|
47
|
+
const queriesByType = {
|
|
48
|
+
domain: relevantMetrics.filter((m) => m.type === 'domain').length,
|
|
49
|
+
ip: relevantMetrics.filter((m) => m.type === 'ip').length,
|
|
50
|
+
asn: relevantMetrics.filter((m) => m.type === 'asn').length,
|
|
51
|
+
};
|
|
52
|
+
const errorsByType = {};
|
|
53
|
+
relevantMetrics
|
|
54
|
+
.filter((m) => !m.success && m.error)
|
|
55
|
+
.forEach((m) => {
|
|
56
|
+
const errorType = m.error;
|
|
57
|
+
errorsByType[errorType] = (errorsByType[errorType] || 0) + 1;
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
total: relevantMetrics.length,
|
|
61
|
+
successful,
|
|
62
|
+
failed,
|
|
63
|
+
successRate: relevantMetrics.length > 0 ? (successful / relevantMetrics.length) * 100 : 0,
|
|
64
|
+
avgResponseTime,
|
|
65
|
+
minResponseTime,
|
|
66
|
+
maxResponseTime,
|
|
67
|
+
p50ResponseTime,
|
|
68
|
+
p90ResponseTime,
|
|
69
|
+
p99ResponseTime,
|
|
70
|
+
cacheHitRate: relevantMetrics.length > 0 ? (cached / relevantMetrics.length) * 100 : 0,
|
|
71
|
+
totalDuration,
|
|
72
|
+
queriesByType,
|
|
73
|
+
errorsByType,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
getPercentiles(since) {
|
|
77
|
+
const relevantMetrics = since
|
|
78
|
+
? this.metrics.filter((m) => m.timestamp >= since)
|
|
79
|
+
: this.metrics;
|
|
80
|
+
if (relevantMetrics.length === 0) {
|
|
81
|
+
return { p50: 0, p75: 0, p90: 0, p95: 0, p99: 0, p999: 0 };
|
|
82
|
+
}
|
|
83
|
+
const sorted = relevantMetrics.map((m) => m.duration).sort((a, b) => a - b);
|
|
84
|
+
return {
|
|
85
|
+
p50: this.calculatePercentile(sorted, 0.5),
|
|
86
|
+
p75: this.calculatePercentile(sorted, 0.75),
|
|
87
|
+
p90: this.calculatePercentile(sorted, 0.9),
|
|
88
|
+
p95: this.calculatePercentile(sorted, 0.95),
|
|
89
|
+
p99: this.calculatePercentile(sorted, 0.99),
|
|
90
|
+
p999: this.calculatePercentile(sorted, 0.999),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
getRegistryStats() {
|
|
94
|
+
const groups = new Map();
|
|
95
|
+
for (const m of this.metrics) {
|
|
96
|
+
const key = m.serverUrl ?? 'unknown';
|
|
97
|
+
const group = groups.get(key);
|
|
98
|
+
if (group) {
|
|
99
|
+
group.push(m);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
groups.set(key, [m]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const result = {};
|
|
106
|
+
for (const [key, group] of groups) {
|
|
107
|
+
const successful = group.filter((m) => m.success).length;
|
|
108
|
+
const cached = group.filter((m) => m.cached).length;
|
|
109
|
+
const durations = group.map((m) => m.duration);
|
|
110
|
+
const totalDuration = durations.reduce((a, b) => a + b, 0);
|
|
111
|
+
const sorted = [...durations].sort((a, b) => a - b);
|
|
112
|
+
result[key] = {
|
|
113
|
+
server: key,
|
|
114
|
+
total: group.length,
|
|
115
|
+
successful,
|
|
116
|
+
failed: group.length - successful,
|
|
117
|
+
avgDuration: group.length > 0 ? totalDuration / group.length : 0,
|
|
118
|
+
p90Duration: this.calculatePercentile(sorted, 0.9),
|
|
119
|
+
cacheHitRate: group.length > 0 ? (cached / group.length) * 100 : 0,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
getTopQueries(limit = 10, since) {
|
|
125
|
+
const relevantMetrics = since
|
|
126
|
+
? this.metrics.filter((m) => m.timestamp >= since)
|
|
127
|
+
: this.metrics;
|
|
128
|
+
const groups = new Map();
|
|
129
|
+
for (const m of relevantMetrics) {
|
|
130
|
+
const group = groups.get(m.query);
|
|
131
|
+
if (group) {
|
|
132
|
+
group.push(m);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
groups.set(m.query, [m]);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return Array.from(groups.entries())
|
|
139
|
+
.map(([query, group]) => {
|
|
140
|
+
const totalDuration = group.reduce((a, m) => a + m.duration, 0);
|
|
141
|
+
const failed = group.filter((m) => !m.success).length;
|
|
142
|
+
return {
|
|
143
|
+
query,
|
|
144
|
+
type: group[0].type,
|
|
145
|
+
count: group.length,
|
|
146
|
+
avgDuration: totalDuration / group.length,
|
|
147
|
+
errorRate: (failed / group.length) * 100,
|
|
148
|
+
};
|
|
149
|
+
})
|
|
150
|
+
.sort((a, b) => b.count - a.count)
|
|
151
|
+
.slice(0, limit);
|
|
152
|
+
}
|
|
153
|
+
getErrorHistogram(since) {
|
|
154
|
+
const relevantMetrics = since
|
|
155
|
+
? this.metrics.filter((m) => m.timestamp >= since)
|
|
156
|
+
: this.metrics;
|
|
157
|
+
const failures = relevantMetrics.filter((m) => !m.success && m.error);
|
|
158
|
+
if (failures.length === 0)
|
|
159
|
+
return [];
|
|
160
|
+
const groups = new Map();
|
|
161
|
+
for (const m of failures) {
|
|
162
|
+
const key = m.error;
|
|
163
|
+
const group = groups.get(key);
|
|
164
|
+
if (group) {
|
|
165
|
+
group.push(m);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
groups.set(key, [m]);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return Array.from(groups.entries())
|
|
172
|
+
.map(([errorType, group]) => ({
|
|
173
|
+
errorType,
|
|
174
|
+
count: group.length,
|
|
175
|
+
percentage: (group.length / failures.length) * 100,
|
|
176
|
+
affectedQueries: [...new Set(group.map((m) => m.query))],
|
|
177
|
+
}))
|
|
178
|
+
.sort((a, b) => b.count - a.count);
|
|
179
|
+
}
|
|
180
|
+
exportPrometheus(prefix = 'rdapify') {
|
|
181
|
+
const summary = this.getSummary();
|
|
182
|
+
const percentiles = this.getPercentiles();
|
|
183
|
+
const errorHistogram = this.getErrorHistogram();
|
|
184
|
+
const cached = this.metrics.filter((m) => m.cached).length;
|
|
185
|
+
const lines = [];
|
|
186
|
+
lines.push(`# HELP ${prefix}_queries_total Total number of RDAP queries`);
|
|
187
|
+
lines.push(`# TYPE ${prefix}_queries_total counter`);
|
|
188
|
+
lines.push(`${prefix}_queries_total{type="domain"} ${summary.queriesByType.domain}`);
|
|
189
|
+
lines.push(`${prefix}_queries_total{type="ip"} ${summary.queriesByType.ip}`);
|
|
190
|
+
lines.push(`${prefix}_queries_total{type="asn"} ${summary.queriesByType.asn}`);
|
|
191
|
+
lines.push('');
|
|
192
|
+
lines.push(`# HELP ${prefix}_query_duration_seconds Query duration in seconds`);
|
|
193
|
+
lines.push(`# TYPE ${prefix}_query_duration_seconds summary`);
|
|
194
|
+
lines.push(`${prefix}_query_duration_seconds{quantile="0.5"} ${(percentiles.p50 / 1000).toFixed(3)}`);
|
|
195
|
+
lines.push(`${prefix}_query_duration_seconds{quantile="0.9"} ${(percentiles.p90 / 1000).toFixed(3)}`);
|
|
196
|
+
lines.push(`${prefix}_query_duration_seconds{quantile="0.99"} ${(percentiles.p99 / 1000).toFixed(3)}`);
|
|
197
|
+
lines.push('');
|
|
198
|
+
lines.push(`# HELP ${prefix}_cache_hits_total Total cache hits`);
|
|
199
|
+
lines.push(`# TYPE ${prefix}_cache_hits_total counter`);
|
|
200
|
+
lines.push(`${prefix}_cache_hits_total ${cached}`);
|
|
201
|
+
lines.push('');
|
|
202
|
+
lines.push(`# HELP ${prefix}_errors_total Total errors by type`);
|
|
203
|
+
lines.push(`# TYPE ${prefix}_errors_total counter`);
|
|
204
|
+
for (const entry of errorHistogram) {
|
|
205
|
+
lines.push(`${prefix}_errors_total{type="${entry.errorType}"} ${entry.count}`);
|
|
206
|
+
}
|
|
207
|
+
return lines.join('\n');
|
|
208
|
+
}
|
|
209
|
+
exportCSV() {
|
|
210
|
+
const header = 'timestamp,type,query,success,duration,cached,serverUrl,error';
|
|
211
|
+
const escapeCSV = (val) => {
|
|
212
|
+
if (val.includes(',') || val.includes('"') || val.includes('\n')) {
|
|
213
|
+
return `"${val.replace(/"/g, '""')}"`;
|
|
214
|
+
}
|
|
215
|
+
return val;
|
|
216
|
+
};
|
|
217
|
+
const rows = this.metrics.map((m) => {
|
|
218
|
+
const fields = [
|
|
219
|
+
String(m.timestamp),
|
|
220
|
+
m.type,
|
|
221
|
+
escapeCSV(m.query),
|
|
222
|
+
String(m.success),
|
|
223
|
+
String(m.duration),
|
|
224
|
+
String(m.cached),
|
|
225
|
+
m.serverUrl ?? '',
|
|
226
|
+
m.error ?? '',
|
|
227
|
+
];
|
|
228
|
+
return fields.join(',');
|
|
229
|
+
});
|
|
230
|
+
return [header, ...rows].join('\n');
|
|
231
|
+
}
|
|
232
|
+
getRecent(count = 10) {
|
|
233
|
+
return this.metrics.slice(-count);
|
|
234
|
+
}
|
|
235
|
+
getWindow(startTime, endTime) {
|
|
236
|
+
return this.metrics.filter((m) => m.timestamp >= startTime && m.timestamp <= endTime);
|
|
237
|
+
}
|
|
238
|
+
getByType(type) {
|
|
239
|
+
return this.metrics.filter((m) => m.type === type);
|
|
240
|
+
}
|
|
241
|
+
getFailures() {
|
|
242
|
+
return this.metrics.filter((m) => !m.success);
|
|
243
|
+
}
|
|
244
|
+
clear() {
|
|
245
|
+
this.metrics = [];
|
|
246
|
+
}
|
|
247
|
+
getEmptySummary() {
|
|
248
|
+
return {
|
|
249
|
+
total: 0,
|
|
250
|
+
successful: 0,
|
|
251
|
+
failed: 0,
|
|
252
|
+
successRate: 0,
|
|
253
|
+
avgResponseTime: 0,
|
|
254
|
+
minResponseTime: 0,
|
|
255
|
+
maxResponseTime: 0,
|
|
256
|
+
p50ResponseTime: 0,
|
|
257
|
+
p90ResponseTime: 0,
|
|
258
|
+
p99ResponseTime: 0,
|
|
259
|
+
cacheHitRate: 0,
|
|
260
|
+
totalDuration: 0,
|
|
261
|
+
queriesByType: {
|
|
262
|
+
domain: 0,
|
|
263
|
+
ip: 0,
|
|
264
|
+
asn: 0,
|
|
265
|
+
},
|
|
266
|
+
errorsByType: {},
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
export() {
|
|
270
|
+
return [...this.metrics];
|
|
271
|
+
}
|
|
272
|
+
import(metrics) {
|
|
273
|
+
this.metrics = metrics.slice(-this.maxMetrics);
|
|
274
|
+
}
|
|
275
|
+
getStats() {
|
|
276
|
+
return {
|
|
277
|
+
enabled: this.enabled,
|
|
278
|
+
totalMetrics: this.metrics.length,
|
|
279
|
+
maxMetrics: this.maxMetrics,
|
|
280
|
+
oldestMetric: this.metrics[0]?.timestamp,
|
|
281
|
+
newestMetric: this.metrics[this.metrics.length - 1]?.timestamp,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const CONTENT_TYPE = 'text/plain; version=0.0.4; charset=utf-8';
|
|
2
|
+
export class PrometheusExporter {
|
|
3
|
+
constructor(getMetrics, options = {}) {
|
|
4
|
+
this.getMetrics = getMetrics;
|
|
5
|
+
this.prefix = options.prefix ?? 'rdapify';
|
|
6
|
+
this.labels = options.labels ?? {};
|
|
7
|
+
}
|
|
8
|
+
export() {
|
|
9
|
+
const m = this.getMetrics();
|
|
10
|
+
const lbl = this.formatLabels(this.labels);
|
|
11
|
+
const p = this.prefix;
|
|
12
|
+
const lines = [];
|
|
13
|
+
const gauge = (name, help, value, extraLabels = {}) => {
|
|
14
|
+
const fullName = `${p}_${name}`;
|
|
15
|
+
lines.push(`# HELP ${fullName} ${help}`);
|
|
16
|
+
lines.push(`# TYPE ${fullName} gauge`);
|
|
17
|
+
lines.push(`${fullName}${this.formatLabels({ ...this.labels, ...extraLabels })} ${value}`);
|
|
18
|
+
};
|
|
19
|
+
const counter = (name, help, value, extraLabels = {}) => {
|
|
20
|
+
const fullName = `${p}_${name}`;
|
|
21
|
+
lines.push(`# HELP ${fullName} ${help}`);
|
|
22
|
+
lines.push(`# TYPE ${fullName} counter`);
|
|
23
|
+
lines.push(`${fullName}_total${this.formatLabels({ ...this.labels, ...extraLabels })} ${value}`);
|
|
24
|
+
};
|
|
25
|
+
counter('queries', 'Total number of RDAP queries executed', m.total);
|
|
26
|
+
counter('queries_successful', 'Total number of successful RDAP queries', m.successful);
|
|
27
|
+
counter('queries_failed', 'Total number of failed RDAP queries', m.failed);
|
|
28
|
+
const types = Object.entries(m.queriesByType);
|
|
29
|
+
const fullTypeName = `${p}_queries_by_type_total`;
|
|
30
|
+
lines.push(`# HELP ${fullTypeName} Total RDAP queries broken down by query type`);
|
|
31
|
+
lines.push(`# TYPE ${fullTypeName} counter`);
|
|
32
|
+
for (const [type, count] of types) {
|
|
33
|
+
lines.push(`${fullTypeName}${this.formatLabels({ ...this.labels, type })} ${count}`);
|
|
34
|
+
}
|
|
35
|
+
gauge('success_rate', 'Fraction of successful queries (0–1)', m.successRate);
|
|
36
|
+
gauge('cache_hit_rate', 'Fraction of queries served from cache (0–1)', m.cacheHitRate);
|
|
37
|
+
gauge('response_time_avg_ms', 'Average RDAP query response time in milliseconds', m.avgResponseTime);
|
|
38
|
+
gauge('response_time_min_ms', 'Minimum RDAP query response time in milliseconds', m.minResponseTime);
|
|
39
|
+
gauge('response_time_max_ms', 'Maximum RDAP query response time in milliseconds', m.maxResponseTime);
|
|
40
|
+
gauge('response_time_p50_ms', 'P50 (median) RDAP query response time in milliseconds', m.p50ResponseTime);
|
|
41
|
+
gauge('response_time_p90_ms', 'P90 RDAP query response time in milliseconds', m.p90ResponseTime);
|
|
42
|
+
gauge('response_time_p99_ms', 'P99 RDAP query response time in milliseconds', m.p99ResponseTime);
|
|
43
|
+
const errorEntries = Object.entries(m.errorsByType);
|
|
44
|
+
if (errorEntries.length > 0) {
|
|
45
|
+
const fullErrName = `${p}_errors_by_type_total`;
|
|
46
|
+
lines.push(`# HELP ${fullErrName} Total RDAP errors broken down by error type`);
|
|
47
|
+
lines.push(`# TYPE ${fullErrName} counter`);
|
|
48
|
+
for (const [errorType, count] of errorEntries) {
|
|
49
|
+
lines.push(`${fullErrName}${this.formatLabels({ ...this.labels, error_type: errorType })} ${count}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
void lbl;
|
|
53
|
+
return lines.join('\n') + '\n';
|
|
54
|
+
}
|
|
55
|
+
createHttpHandler() {
|
|
56
|
+
return (_req, res) => {
|
|
57
|
+
res.setHeader('Content-Type', CONTENT_TYPE);
|
|
58
|
+
res.end(this.export());
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
formatLabels(labels) {
|
|
62
|
+
const entries = Object.entries(labels);
|
|
63
|
+
if (entries.length === 0)
|
|
64
|
+
return '';
|
|
65
|
+
const pairs = entries.map(([k, v]) => `${k}="${this.escapeLabel(v)}"`).join(',');
|
|
66
|
+
return `{${pairs}}`;
|
|
67
|
+
}
|
|
68
|
+
escapeLabel(value) {
|
|
69
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
PrometheusExporter.CONTENT_TYPE = CONTENT_TYPE;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const RDAPIFY_VERSION = '0.2.3';
|
|
2
|
+
export class TelemetryExporter {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
this.endpoint = options.endpoint ?? '';
|
|
5
|
+
this.serviceName = options.serviceName ?? 'rdapify';
|
|
6
|
+
this.serviceVersion = options.serviceVersion ?? RDAPIFY_VERSION;
|
|
7
|
+
this.resourceAttributes = options.resourceAttributes ?? {};
|
|
8
|
+
this.enabled = options.enabled !== false && Boolean(this.endpoint);
|
|
9
|
+
}
|
|
10
|
+
isEnabled() {
|
|
11
|
+
return this.enabled;
|
|
12
|
+
}
|
|
13
|
+
async exportSpans(spans) {
|
|
14
|
+
if (!this.enabled || spans.length === 0)
|
|
15
|
+
return;
|
|
16
|
+
const payload = this.buildOtlpPayload(spans);
|
|
17
|
+
try {
|
|
18
|
+
const body = JSON.stringify(payload);
|
|
19
|
+
await this.sendRequest(body);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
startSpan(name, attributes, parentSpanId) {
|
|
25
|
+
const span = {
|
|
26
|
+
traceId: this.generateId(16),
|
|
27
|
+
spanId: this.generateId(8),
|
|
28
|
+
parentSpanId,
|
|
29
|
+
name,
|
|
30
|
+
startTimeUnixNano: this.nowNano(),
|
|
31
|
+
endTimeUnixNano: '0',
|
|
32
|
+
attributes: attributes ? this.encodeAttributes(attributes) : [],
|
|
33
|
+
};
|
|
34
|
+
return span;
|
|
35
|
+
}
|
|
36
|
+
async endSpan(span, status = { code: 0 }) {
|
|
37
|
+
span.endTimeUnixNano = this.nowNano();
|
|
38
|
+
span.status = status;
|
|
39
|
+
await this.exportSpans([span]);
|
|
40
|
+
}
|
|
41
|
+
buildOtlpPayload(spans) {
|
|
42
|
+
const resourceAttrs = this.encodeAttributes({
|
|
43
|
+
'service.name': this.serviceName,
|
|
44
|
+
'service.version': this.serviceVersion,
|
|
45
|
+
'telemetry.sdk.name': 'rdapify',
|
|
46
|
+
'telemetry.sdk.language': 'javascript',
|
|
47
|
+
...this.resourceAttributes,
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
resourceSpans: [
|
|
51
|
+
{
|
|
52
|
+
resource: { attributes: resourceAttrs },
|
|
53
|
+
scopeSpans: [
|
|
54
|
+
{
|
|
55
|
+
scope: { name: 'rdapify', version: this.serviceVersion },
|
|
56
|
+
spans: spans.map((s) => ({
|
|
57
|
+
traceId: s.traceId,
|
|
58
|
+
spanId: s.spanId,
|
|
59
|
+
parentSpanId: s.parentSpanId,
|
|
60
|
+
name: s.name,
|
|
61
|
+
kind: 3,
|
|
62
|
+
startTimeUnixNano: s.startTimeUnixNano,
|
|
63
|
+
endTimeUnixNano: s.endTimeUnixNano,
|
|
64
|
+
attributes: s.attributes ?? [],
|
|
65
|
+
status: s.status ?? { code: 0 },
|
|
66
|
+
})),
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
encodeAttributes(attrs) {
|
|
74
|
+
return Object.entries(attrs).map(([key, value]) => {
|
|
75
|
+
if (typeof value === 'boolean') {
|
|
76
|
+
return { key, value: { boolValue: value } };
|
|
77
|
+
}
|
|
78
|
+
else if (typeof value === 'number') {
|
|
79
|
+
return { key, value: { intValue: value } };
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return { key, value: { stringValue: String(value) } };
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async sendRequest(body) {
|
|
87
|
+
const fetchFn = typeof globalThis !== 'undefined' && typeof globalThis['fetch'] === 'function'
|
|
88
|
+
? globalThis['fetch']
|
|
89
|
+
: (() => { throw new Error('No fetch available'); })();
|
|
90
|
+
const response = await fetchFn(this.endpoint, {
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: {
|
|
93
|
+
'Content-Type': 'application/json',
|
|
94
|
+
'Accept': 'application/json',
|
|
95
|
+
},
|
|
96
|
+
body,
|
|
97
|
+
});
|
|
98
|
+
if (!response.ok) {
|
|
99
|
+
throw new Error(`OTLP export failed: ${response.status} ${response.statusText}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
generateId(bytes) {
|
|
103
|
+
const hex = [];
|
|
104
|
+
for (let i = 0; i < bytes * 2; i++) {
|
|
105
|
+
hex.push(Math.floor(Math.random() * 16).toString(16));
|
|
106
|
+
}
|
|
107
|
+
return hex.join('');
|
|
108
|
+
}
|
|
109
|
+
nowNano() {
|
|
110
|
+
return (BigInt(Date.now()) * BigInt(1000000)).toString();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
let _module;
|
|
2
|
+
function tryLoadCore() {
|
|
3
|
+
if (_module !== undefined)
|
|
4
|
+
return _module;
|
|
5
|
+
try {
|
|
6
|
+
_module = require('rdapify-nd');
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
_module = null;
|
|
10
|
+
}
|
|
11
|
+
return _module;
|
|
12
|
+
}
|
|
13
|
+
export function isNativeAvailable() {
|
|
14
|
+
return tryLoadCore() !== null;
|
|
15
|
+
}
|
|
16
|
+
function adaptMeta(raw) {
|
|
17
|
+
const meta = (raw['meta'] ?? {});
|
|
18
|
+
return {
|
|
19
|
+
source: meta['source'] ?? '',
|
|
20
|
+
timestamp: meta['queried_at'] ?? '',
|
|
21
|
+
cached: meta['cached'] ?? false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function strippedFields(raw) {
|
|
25
|
+
const { meta: _meta, objectClass: _oc, ...rest } = raw;
|
|
26
|
+
void _meta;
|
|
27
|
+
void _oc;
|
|
28
|
+
return rest;
|
|
29
|
+
}
|
|
30
|
+
export class NativeBackend {
|
|
31
|
+
constructor(core) {
|
|
32
|
+
this.core = core;
|
|
33
|
+
}
|
|
34
|
+
static create(mode) {
|
|
35
|
+
const core = tryLoadCore();
|
|
36
|
+
if (!core) {
|
|
37
|
+
if (mode === 'native') {
|
|
38
|
+
throw new Error('rdapify-nd is not installed. Run: npm install rdapify-nd\n' +
|
|
39
|
+
'Or use backend: "auto" to fall back to the TypeScript backend.');
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return new NativeBackend(core);
|
|
44
|
+
}
|
|
45
|
+
async domain(query) {
|
|
46
|
+
const raw = (await this.core.domain(query));
|
|
47
|
+
return {
|
|
48
|
+
...strippedFields(raw),
|
|
49
|
+
objectClass: 'domain',
|
|
50
|
+
metadata: adaptMeta(raw),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async ip(query) {
|
|
54
|
+
const raw = (await this.core.ip(query));
|
|
55
|
+
return {
|
|
56
|
+
...strippedFields(raw),
|
|
57
|
+
objectClass: 'ip network',
|
|
58
|
+
metadata: adaptMeta(raw),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async asn(query) {
|
|
62
|
+
const raw = (await this.core.asn(String(query)));
|
|
63
|
+
return {
|
|
64
|
+
...strippedFields(raw),
|
|
65
|
+
query: String(raw['query']),
|
|
66
|
+
objectClass: 'autnum',
|
|
67
|
+
metadata: adaptMeta(raw),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
async nameserver(query) {
|
|
71
|
+
const raw = (await this.core.nameserver(query));
|
|
72
|
+
return {
|
|
73
|
+
...strippedFields(raw),
|
|
74
|
+
objectClass: 'nameserver',
|
|
75
|
+
metadata: adaptMeta(raw),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async entity(handle, serverUrl) {
|
|
79
|
+
const raw = (await this.core.entity(handle, serverUrl));
|
|
80
|
+
return {
|
|
81
|
+
...strippedFields(raw),
|
|
82
|
+
objectClass: 'entity',
|
|
83
|
+
metadata: adaptMeta(raw),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export class PIIRedactor {
|
|
2
|
+
constructor(options = {}) {
|
|
3
|
+
this.options = {
|
|
4
|
+
redactPII: options.redactPII ?? true,
|
|
5
|
+
redactFields: options.redactFields || ['email', 'phone', 'fax'],
|
|
6
|
+
redactionText: options.redactionText || '[REDACTED]',
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
redact(response) {
|
|
10
|
+
if (!this.options.redactPII) {
|
|
11
|
+
return response;
|
|
12
|
+
}
|
|
13
|
+
let redacted;
|
|
14
|
+
try {
|
|
15
|
+
redacted = structuredClone(response);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
const jsonString = JSON.stringify(response);
|
|
19
|
+
redacted = JSON.parse(jsonString);
|
|
20
|
+
}
|
|
21
|
+
if (redacted.entities && Array.isArray(redacted.entities)) {
|
|
22
|
+
redacted.entities = redacted.entities.map((entity) => this.redactEntity(entity));
|
|
23
|
+
}
|
|
24
|
+
return redacted;
|
|
25
|
+
}
|
|
26
|
+
redactEntity(entity) {
|
|
27
|
+
const redacted = { ...entity };
|
|
28
|
+
if (redacted.vcardArray && Array.isArray(redacted.vcardArray)) {
|
|
29
|
+
redacted.vcardArray = this.redactVCard(redacted.vcardArray);
|
|
30
|
+
}
|
|
31
|
+
if (redacted.entities && Array.isArray(redacted.entities)) {
|
|
32
|
+
redacted.entities = redacted.entities.map((e) => this.redactEntity(e));
|
|
33
|
+
}
|
|
34
|
+
return redacted;
|
|
35
|
+
}
|
|
36
|
+
redactVCard(vcardArray) {
|
|
37
|
+
if (!Array.isArray(vcardArray) || vcardArray.length < 2) {
|
|
38
|
+
return vcardArray;
|
|
39
|
+
}
|
|
40
|
+
const [version, fields] = vcardArray;
|
|
41
|
+
if (!Array.isArray(fields)) {
|
|
42
|
+
return vcardArray;
|
|
43
|
+
}
|
|
44
|
+
const redactedFields = fields.map((field) => {
|
|
45
|
+
if (!Array.isArray(field) || field.length < 4) {
|
|
46
|
+
return field;
|
|
47
|
+
}
|
|
48
|
+
const [fieldName, params, type] = field;
|
|
49
|
+
if (this.shouldRedactField(fieldName)) {
|
|
50
|
+
return [fieldName, params, type, this.options.redactionText];
|
|
51
|
+
}
|
|
52
|
+
return field;
|
|
53
|
+
});
|
|
54
|
+
return [version, redactedFields];
|
|
55
|
+
}
|
|
56
|
+
shouldRedactField(fieldName) {
|
|
57
|
+
const normalizedName = fieldName.toLowerCase();
|
|
58
|
+
for (const field of this.options.redactFields) {
|
|
59
|
+
if (normalizedName === field.toLowerCase() || normalizedName.includes(field.toLowerCase())) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const piiPatterns = [
|
|
64
|
+
'email',
|
|
65
|
+
'tel',
|
|
66
|
+
'phone',
|
|
67
|
+
'fax',
|
|
68
|
+
'adr',
|
|
69
|
+
'address',
|
|
70
|
+
'geo',
|
|
71
|
+
'key',
|
|
72
|
+
'photo',
|
|
73
|
+
'sound',
|
|
74
|
+
'uid',
|
|
75
|
+
'url',
|
|
76
|
+
];
|
|
77
|
+
return piiPatterns.some((pattern) => normalizedName === pattern || normalizedName.includes(pattern));
|
|
78
|
+
}
|
|
79
|
+
getConfig() {
|
|
80
|
+
return { ...this.options, redactFields: [...this.options.redactFields] };
|
|
81
|
+
}
|
|
82
|
+
isEnabled() {
|
|
83
|
+
return this.options.redactPII;
|
|
84
|
+
}
|
|
85
|
+
}
|