rdapify 0.3.0 → 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.
Files changed (499) hide show
  1. package/README.ar.md +572 -0
  2. package/README.md +74 -77
  3. package/dist/{application → cjs/application}/client/RDAPClient.js +197 -6
  4. package/dist/{application → cjs/application}/client/index.js +0 -1
  5. package/dist/{application → cjs/application}/deduplication/QueryDeduplicator.js +0 -1
  6. package/dist/{application → cjs/application}/hooks/MiddlewareHooks.js +0 -1
  7. package/dist/{application → cjs/application}/services/BatchProcessor.js +0 -1
  8. package/dist/{application → cjs/application}/services/QueryOrchestrator.js +0 -1
  9. package/dist/{application → cjs/application}/services/QueryPriority.js +0 -1
  10. package/dist/{application → cjs/application}/services/index.js +0 -1
  11. package/dist/{cli → cjs/cli}/index.js +0 -1
  12. package/dist/cjs/core/ports/bootstrap.port.js +2 -0
  13. package/dist/cjs/core/ports/cache.port.js +2 -0
  14. package/dist/cjs/core/ports/fetcher.port.js +2 -0
  15. package/dist/{core → cjs/core}/ports/index.js +0 -1
  16. package/dist/cjs/core/ports/normalizer.port.js +2 -0
  17. package/dist/cjs/core/ports/pii-redactor.port.js +2 -0
  18. package/dist/{index.js → cjs/index.js} +8 -4
  19. package/dist/{infrastructure → cjs/infrastructure}/cache/CacheManager.js +4 -1
  20. package/dist/{infrastructure → cjs/infrastructure}/cache/InMemoryCache.js +0 -1
  21. package/dist/{infrastructure → cjs/infrastructure}/cache/PersistentCache.js +0 -1
  22. package/dist/{infrastructure → cjs/infrastructure}/cache/RedisCache.js +0 -1
  23. package/dist/cjs/infrastructure/cache/StaleWhileRevalidateCache.js +47 -0
  24. package/dist/{infrastructure → cjs/infrastructure}/cache/index.js +0 -1
  25. package/dist/{infrastructure → cjs/infrastructure}/http/AuthenticationManager.js +0 -1
  26. package/dist/{infrastructure → cjs/infrastructure}/http/BootstrapDiscovery.js +0 -1
  27. package/dist/{infrastructure → cjs/infrastructure}/http/BrowserFetcher.js +0 -1
  28. package/dist/{infrastructure → cjs/infrastructure}/http/BunFetcher.js +0 -1
  29. package/dist/{infrastructure → cjs/infrastructure}/http/CircuitBreaker.js +0 -1
  30. package/dist/{infrastructure → cjs/infrastructure}/http/CloudflareWorkersFetcher.js +0 -1
  31. package/dist/{infrastructure → cjs/infrastructure}/http/CompressionManager.js +0 -1
  32. package/dist/{infrastructure → cjs/infrastructure}/http/ConnectionPool.js +0 -1
  33. package/dist/{infrastructure → cjs/infrastructure}/http/DenoFetcher.js +0 -1
  34. package/dist/cjs/infrastructure/http/DistributedRateLimiter.js +26 -0
  35. package/dist/{infrastructure → cjs/infrastructure}/http/Fetcher.js +5 -1
  36. package/dist/{infrastructure → cjs/infrastructure}/http/Normalizer.js +23 -1
  37. package/dist/{infrastructure → cjs/infrastructure}/http/ProxyManager.js +0 -1
  38. package/dist/{infrastructure → cjs/infrastructure}/http/RateLimiter.js +6 -1
  39. package/dist/{infrastructure → cjs/infrastructure}/http/RetryStrategy.js +0 -1
  40. package/dist/{infrastructure → cjs/infrastructure}/http/index.js +0 -1
  41. package/dist/{infrastructure → cjs/infrastructure}/logging/AuditLogger.js +0 -1
  42. package/dist/{infrastructure → cjs/infrastructure}/logging/Logger.js +0 -1
  43. package/dist/{infrastructure → cjs/infrastructure}/monitoring/GrafanaDashboard.js +0 -1
  44. package/dist/{infrastructure → cjs/infrastructure}/monitoring/MetricsCollector.js +0 -1
  45. package/dist/{infrastructure → cjs/infrastructure}/monitoring/PrometheusExporter.js +0 -1
  46. package/dist/{infrastructure → cjs/infrastructure}/monitoring/TelemetryExporter.js +0 -1
  47. package/dist/{infrastructure → cjs/infrastructure}/native/NativeBackend.js +0 -1
  48. package/dist/{infrastructure → cjs/infrastructure}/security/PIIRedactor.js +0 -1
  49. package/dist/{infrastructure → cjs/infrastructure}/security/SSRFProtection.js +23 -1
  50. package/dist/{infrastructure → cjs/infrastructure}/security/index.js +0 -1
  51. package/dist/cjs/infrastructure/telemetry/UsageTelemetry.js +89 -0
  52. package/dist/{infrastructure → cjs/infrastructure}/validation/ResponseValidator.js +0 -1
  53. package/dist/{integrations → cjs/integrations}/express.js +0 -1
  54. package/dist/{integrations → cjs/integrations}/graphql.js +0 -1
  55. package/dist/{integrations → cjs/integrations}/nestjs.js +0 -1
  56. package/dist/{shared → cjs/shared}/constants/http.constants.js +0 -1
  57. package/dist/{shared → cjs/shared}/constants/index.js +0 -1
  58. package/dist/{shared → cjs/shared}/constants/rdap.constants.js +0 -1
  59. package/dist/{shared → cjs/shared}/errors/base.error.js +7 -2
  60. package/dist/{shared → cjs/shared}/errors/index.js +0 -1
  61. package/dist/{shared → cjs/shared}/types/entities.js +0 -1
  62. package/dist/{shared → cjs/shared}/types/enums.js +0 -1
  63. package/dist/{shared → cjs/shared}/types/errors.js +0 -1
  64. package/dist/{shared → cjs/shared}/types/generics.js +0 -1
  65. package/dist/{shared → cjs/shared}/types/index.js +0 -1
  66. package/dist/{shared → cjs/shared}/types/options.js +5 -1
  67. package/dist/cjs/shared/types/responses.js +2 -0
  68. package/dist/{shared → cjs/shared}/utils/deprecation.js +0 -1
  69. package/dist/{shared → cjs/shared}/utils/enhanced-validators.js +0 -1
  70. package/dist/{shared → cjs/shared}/utils/helpers/async.js +0 -1
  71. package/dist/{shared → cjs/shared}/utils/helpers/cache.js +0 -1
  72. package/dist/{shared → cjs/shared}/utils/helpers/format.js +0 -1
  73. package/dist/{shared → cjs/shared}/utils/helpers/http.js +0 -1
  74. package/dist/{shared → cjs/shared}/utils/helpers/index.js +0 -1
  75. package/dist/{shared → cjs/shared}/utils/helpers/object.js +0 -1
  76. package/dist/{shared → cjs/shared}/utils/helpers/runtime.js +0 -1
  77. package/dist/{shared → cjs/shared}/utils/helpers/string.js +0 -1
  78. package/dist/{shared → cjs/shared}/utils/validators/asn.js +0 -1
  79. package/dist/{shared → cjs/shared}/utils/validators/config-validation.js +0 -1
  80. package/dist/{shared → cjs/shared}/utils/validators/domain.js +0 -1
  81. package/dist/{shared → cjs/shared}/utils/validators/entity.js +0 -1
  82. package/dist/{shared → cjs/shared}/utils/validators/index.js +0 -1
  83. package/dist/{shared → cjs/shared}/utils/validators/ip.js +0 -1
  84. package/dist/{shared → cjs/shared}/utils/validators/nameserver.js +0 -1
  85. package/dist/{shared → cjs/shared}/utils/validators/network.js +0 -1
  86. package/dist/esm/application/client/RDAPClient.js +439 -0
  87. package/dist/esm/application/client/index.js +1 -0
  88. package/dist/esm/application/deduplication/QueryDeduplicator.js +41 -0
  89. package/dist/esm/application/hooks/MiddlewareHooks.js +79 -0
  90. package/dist/esm/application/services/BatchProcessor.js +145 -0
  91. package/dist/esm/application/services/QueryOrchestrator.js +615 -0
  92. package/dist/esm/application/services/QueryPriority.js +109 -0
  93. package/dist/esm/application/services/index.js +2 -0
  94. package/dist/esm/cli/index.js +297 -0
  95. package/dist/esm/core/ports/bootstrap.port.js +1 -0
  96. package/dist/esm/core/ports/cache.port.js +1 -0
  97. package/dist/esm/core/ports/fetcher.port.js +1 -0
  98. package/dist/esm/core/ports/index.js +5 -0
  99. package/dist/esm/core/ports/normalizer.port.js +1 -0
  100. package/dist/esm/core/ports/pii-redactor.port.js +1 -0
  101. package/dist/esm/index.js +40 -0
  102. package/dist/esm/infrastructure/cache/CacheManager.js +123 -0
  103. package/dist/esm/infrastructure/cache/InMemoryCache.js +91 -0
  104. package/dist/esm/infrastructure/cache/PersistentCache.js +188 -0
  105. package/dist/esm/infrastructure/cache/RedisCache.js +106 -0
  106. package/dist/esm/infrastructure/cache/StaleWhileRevalidateCache.js +43 -0
  107. package/dist/esm/infrastructure/cache/index.js +3 -0
  108. package/dist/esm/infrastructure/http/AuthenticationManager.js +94 -0
  109. package/dist/esm/infrastructure/http/BootstrapDiscovery.js +189 -0
  110. package/dist/esm/infrastructure/http/BrowserFetcher.js +42 -0
  111. package/dist/esm/infrastructure/http/BunFetcher.js +46 -0
  112. package/dist/esm/infrastructure/http/CircuitBreaker.js +98 -0
  113. package/dist/esm/infrastructure/http/CloudflareWorkersFetcher.js +39 -0
  114. package/dist/esm/infrastructure/http/CompressionManager.js +80 -0
  115. package/dist/esm/infrastructure/http/ConnectionPool.js +101 -0
  116. package/dist/esm/infrastructure/http/DenoFetcher.js +38 -0
  117. package/dist/esm/infrastructure/http/DistributedRateLimiter.js +22 -0
  118. package/dist/esm/infrastructure/http/Fetcher.js +127 -0
  119. package/dist/esm/infrastructure/http/Normalizer.js +233 -0
  120. package/dist/esm/infrastructure/http/ProxyManager.js +82 -0
  121. package/dist/esm/infrastructure/http/RateLimiter.js +102 -0
  122. package/dist/esm/infrastructure/http/RetryStrategy.js +131 -0
  123. package/dist/esm/infrastructure/http/index.js +3 -0
  124. package/dist/esm/infrastructure/logging/AuditLogger.js +187 -0
  125. package/dist/esm/infrastructure/logging/Logger.js +145 -0
  126. package/dist/esm/infrastructure/monitoring/GrafanaDashboard.js +115 -0
  127. package/dist/esm/infrastructure/monitoring/MetricsCollector.js +284 -0
  128. package/dist/esm/infrastructure/monitoring/PrometheusExporter.js +72 -0
  129. package/dist/esm/infrastructure/monitoring/TelemetryExporter.js +112 -0
  130. package/dist/esm/infrastructure/native/NativeBackend.js +86 -0
  131. package/dist/esm/infrastructure/security/PIIRedactor.js +85 -0
  132. package/dist/esm/infrastructure/security/SSRFProtection.js +162 -0
  133. package/dist/esm/infrastructure/security/index.js +2 -0
  134. package/dist/esm/infrastructure/telemetry/UsageTelemetry.js +84 -0
  135. package/dist/esm/infrastructure/validation/ResponseValidator.js +194 -0
  136. package/dist/esm/integrations/express.js +43 -0
  137. package/dist/esm/integrations/graphql.js +80 -0
  138. package/dist/esm/integrations/nestjs.js +23 -0
  139. package/dist/esm/shared/constants/http.constants.js +25 -0
  140. package/dist/esm/shared/constants/index.js +2 -0
  141. package/dist/esm/shared/constants/rdap.constants.js +17 -0
  142. package/dist/esm/shared/errors/base.error.js +140 -0
  143. package/dist/esm/shared/errors/index.js +1 -0
  144. package/dist/esm/shared/types/entities.js +1 -0
  145. package/dist/esm/shared/types/enums.js +1 -0
  146. package/dist/esm/shared/types/errors.js +82 -0
  147. package/dist/esm/shared/types/generics.js +1 -0
  148. package/dist/esm/shared/types/index.js +1 -0
  149. package/dist/esm/shared/types/options.js +66 -0
  150. package/dist/esm/shared/types/responses.js +1 -0
  151. package/dist/esm/shared/utils/deprecation.js +20 -0
  152. package/dist/esm/shared/utils/enhanced-validators.js +148 -0
  153. package/dist/esm/shared/utils/helpers/async.js +40 -0
  154. package/dist/esm/shared/utils/helpers/cache.js +3 -0
  155. package/dist/esm/shared/utils/helpers/format.js +17 -0
  156. package/dist/esm/shared/utils/helpers/http.js +13 -0
  157. package/dist/esm/shared/utils/helpers/index.js +7 -0
  158. package/dist/esm/shared/utils/helpers/object.js +19 -0
  159. package/dist/esm/shared/utils/helpers/runtime.js +34 -0
  160. package/dist/esm/shared/utils/helpers/string.js +23 -0
  161. package/dist/esm/shared/utils/validators/asn.js +25 -0
  162. package/dist/esm/shared/utils/validators/config-validation.js +93 -0
  163. package/dist/esm/shared/utils/validators/domain.js +29 -0
  164. package/dist/esm/shared/utils/validators/entity.js +22 -0
  165. package/dist/esm/shared/utils/validators/index.js +7 -0
  166. package/dist/esm/shared/utils/validators/ip.js +48 -0
  167. package/dist/esm/shared/utils/validators/nameserver.js +44 -0
  168. package/dist/esm/shared/utils/validators/network.js +42 -0
  169. package/dist/{application → types/application}/client/RDAPClient.d.ts +10 -1
  170. package/dist/types/application/client/RDAPClient.d.ts.map +1 -0
  171. package/dist/types/application/client/index.d.ts.map +1 -0
  172. package/dist/types/application/deduplication/QueryDeduplicator.d.ts.map +1 -0
  173. package/dist/types/application/hooks/MiddlewareHooks.d.ts.map +1 -0
  174. package/dist/types/application/services/BatchProcessor.d.ts.map +1 -0
  175. package/dist/types/application/services/QueryOrchestrator.d.ts.map +1 -0
  176. package/dist/types/application/services/QueryPriority.d.ts.map +1 -0
  177. package/dist/types/application/services/index.d.ts.map +1 -0
  178. package/dist/{cli → types/cli}/index.d.ts.map +1 -1
  179. package/dist/types/core/ports/bootstrap.port.d.ts.map +1 -0
  180. package/dist/types/core/ports/cache.port.d.ts.map +1 -0
  181. package/dist/types/core/ports/fetcher.port.d.ts.map +1 -0
  182. package/dist/types/core/ports/index.d.ts.map +1 -0
  183. package/dist/types/core/ports/normalizer.port.d.ts.map +1 -0
  184. package/dist/types/core/ports/pii-redactor.port.d.ts.map +1 -0
  185. package/dist/{index.d.ts → types/index.d.ts} +6 -3
  186. package/dist/types/index.d.ts.map +1 -0
  187. package/dist/types/infrastructure/cache/CacheManager.d.ts.map +1 -0
  188. package/dist/types/infrastructure/cache/InMemoryCache.d.ts.map +1 -0
  189. package/dist/types/infrastructure/cache/PersistentCache.d.ts.map +1 -0
  190. package/dist/types/infrastructure/cache/RedisCache.d.ts.map +1 -0
  191. package/dist/types/infrastructure/cache/StaleWhileRevalidateCache.d.ts +16 -0
  192. package/dist/types/infrastructure/cache/StaleWhileRevalidateCache.d.ts.map +1 -0
  193. package/dist/types/infrastructure/cache/index.d.ts.map +1 -0
  194. package/dist/types/infrastructure/http/AuthenticationManager.d.ts.map +1 -0
  195. package/dist/types/infrastructure/http/BootstrapDiscovery.d.ts.map +1 -0
  196. package/dist/types/infrastructure/http/BrowserFetcher.d.ts.map +1 -0
  197. package/dist/types/infrastructure/http/BunFetcher.d.ts.map +1 -0
  198. package/dist/types/infrastructure/http/CircuitBreaker.d.ts.map +1 -0
  199. package/dist/types/infrastructure/http/CloudflareWorkersFetcher.d.ts.map +1 -0
  200. package/dist/types/infrastructure/http/CompressionManager.d.ts.map +1 -0
  201. package/dist/types/infrastructure/http/ConnectionPool.d.ts.map +1 -0
  202. package/dist/types/infrastructure/http/DenoFetcher.d.ts.map +1 -0
  203. package/dist/types/infrastructure/http/DistributedRateLimiter.d.ts +12 -0
  204. package/dist/types/infrastructure/http/DistributedRateLimiter.d.ts.map +1 -0
  205. package/dist/{infrastructure → types/infrastructure}/http/Fetcher.d.ts +2 -0
  206. package/dist/types/infrastructure/http/Fetcher.d.ts.map +1 -0
  207. package/dist/types/infrastructure/http/Normalizer.d.ts.map +1 -0
  208. package/dist/types/infrastructure/http/ProxyManager.d.ts.map +1 -0
  209. package/dist/{infrastructure → types/infrastructure}/http/RateLimiter.d.ts +5 -0
  210. package/dist/types/infrastructure/http/RateLimiter.d.ts.map +1 -0
  211. package/dist/types/infrastructure/http/RetryStrategy.d.ts.map +1 -0
  212. package/dist/types/infrastructure/http/index.d.ts.map +1 -0
  213. package/dist/types/infrastructure/logging/AuditLogger.d.ts.map +1 -0
  214. package/dist/types/infrastructure/logging/Logger.d.ts.map +1 -0
  215. package/dist/{infrastructure → types/infrastructure}/monitoring/GrafanaDashboard.d.ts.map +1 -1
  216. package/dist/types/infrastructure/monitoring/MetricsCollector.d.ts.map +1 -0
  217. package/dist/types/infrastructure/monitoring/PrometheusExporter.d.ts.map +1 -0
  218. package/dist/types/infrastructure/monitoring/TelemetryExporter.d.ts.map +1 -0
  219. package/dist/types/infrastructure/native/NativeBackend.d.ts.map +1 -0
  220. package/dist/types/infrastructure/security/PIIRedactor.d.ts.map +1 -0
  221. package/dist/{infrastructure → types/infrastructure}/security/SSRFProtection.d.ts +1 -0
  222. package/dist/types/infrastructure/security/SSRFProtection.d.ts.map +1 -0
  223. package/dist/types/infrastructure/security/index.d.ts.map +1 -0
  224. package/dist/types/infrastructure/telemetry/UsageTelemetry.d.ts +13 -0
  225. package/dist/types/infrastructure/telemetry/UsageTelemetry.d.ts.map +1 -0
  226. package/dist/types/infrastructure/validation/ResponseValidator.d.ts.map +1 -0
  227. package/dist/types/integrations/express.d.ts.map +1 -0
  228. package/dist/types/integrations/graphql.d.ts.map +1 -0
  229. package/dist/types/integrations/nestjs.d.ts.map +1 -0
  230. package/dist/types/shared/constants/http.constants.d.ts.map +1 -0
  231. package/dist/types/shared/constants/index.d.ts.map +1 -0
  232. package/dist/types/shared/constants/rdap.constants.d.ts.map +1 -0
  233. package/dist/{shared → types/shared}/errors/base.error.d.ts +3 -0
  234. package/dist/types/shared/errors/base.error.d.ts.map +1 -0
  235. package/dist/types/shared/errors/index.d.ts.map +1 -0
  236. package/dist/types/shared/types/entities.d.ts.map +1 -0
  237. package/dist/{shared → types/shared}/types/enums.d.ts +1 -1
  238. package/dist/types/shared/types/enums.d.ts.map +1 -0
  239. package/dist/types/shared/types/errors.d.ts.map +1 -0
  240. package/dist/types/shared/types/generics.d.ts.map +1 -0
  241. package/dist/{shared → types/shared}/types/index.d.ts +1 -1
  242. package/dist/types/shared/types/index.d.ts.map +1 -0
  243. package/dist/{shared → types/shared}/types/options.d.ts +9 -0
  244. package/dist/types/shared/types/options.d.ts.map +1 -0
  245. package/dist/{shared → types/shared}/types/responses.d.ts +20 -0
  246. package/dist/types/shared/types/responses.d.ts.map +1 -0
  247. package/dist/types/shared/utils/deprecation.d.ts.map +1 -0
  248. package/dist/types/shared/utils/enhanced-validators.d.ts.map +1 -0
  249. package/dist/types/shared/utils/helpers/async.d.ts.map +1 -0
  250. package/dist/types/shared/utils/helpers/cache.d.ts.map +1 -0
  251. package/dist/types/shared/utils/helpers/format.d.ts.map +1 -0
  252. package/dist/types/shared/utils/helpers/http.d.ts.map +1 -0
  253. package/dist/types/shared/utils/helpers/index.d.ts.map +1 -0
  254. package/dist/types/shared/utils/helpers/object.d.ts.map +1 -0
  255. package/dist/types/shared/utils/helpers/runtime.d.ts.map +1 -0
  256. package/dist/types/shared/utils/helpers/string.d.ts.map +1 -0
  257. package/dist/types/shared/utils/validators/asn.d.ts.map +1 -0
  258. package/dist/types/shared/utils/validators/config-validation.d.ts.map +1 -0
  259. package/dist/types/shared/utils/validators/domain.d.ts.map +1 -0
  260. package/dist/types/shared/utils/validators/entity.d.ts.map +1 -0
  261. package/dist/types/shared/utils/validators/index.d.ts.map +1 -0
  262. package/dist/types/shared/utils/validators/ip.d.ts.map +1 -0
  263. package/dist/types/shared/utils/validators/nameserver.d.ts.map +1 -0
  264. package/dist/types/shared/utils/validators/network.d.ts.map +1 -0
  265. package/package.json +29 -25
  266. package/dist/application/client/RDAPClient.d.ts.map +0 -1
  267. package/dist/application/client/RDAPClient.js.map +0 -1
  268. package/dist/application/client/index.d.ts.map +0 -1
  269. package/dist/application/client/index.js.map +0 -1
  270. package/dist/application/deduplication/QueryDeduplicator.d.ts.map +0 -1
  271. package/dist/application/deduplication/QueryDeduplicator.js.map +0 -1
  272. package/dist/application/hooks/MiddlewareHooks.d.ts.map +0 -1
  273. package/dist/application/hooks/MiddlewareHooks.js.map +0 -1
  274. package/dist/application/services/BatchProcessor.d.ts.map +0 -1
  275. package/dist/application/services/BatchProcessor.js.map +0 -1
  276. package/dist/application/services/QueryOrchestrator.d.ts.map +0 -1
  277. package/dist/application/services/QueryOrchestrator.js.map +0 -1
  278. package/dist/application/services/QueryPriority.d.ts.map +0 -1
  279. package/dist/application/services/QueryPriority.js.map +0 -1
  280. package/dist/application/services/index.d.ts.map +0 -1
  281. package/dist/application/services/index.js.map +0 -1
  282. package/dist/cli/index.js.map +0 -1
  283. package/dist/core/ports/bootstrap.port.d.ts.map +0 -1
  284. package/dist/core/ports/bootstrap.port.js +0 -3
  285. package/dist/core/ports/bootstrap.port.js.map +0 -1
  286. package/dist/core/ports/cache.port.d.ts.map +0 -1
  287. package/dist/core/ports/cache.port.js +0 -3
  288. package/dist/core/ports/cache.port.js.map +0 -1
  289. package/dist/core/ports/fetcher.port.d.ts.map +0 -1
  290. package/dist/core/ports/fetcher.port.js +0 -3
  291. package/dist/core/ports/fetcher.port.js.map +0 -1
  292. package/dist/core/ports/index.d.ts.map +0 -1
  293. package/dist/core/ports/index.js.map +0 -1
  294. package/dist/core/ports/normalizer.port.d.ts.map +0 -1
  295. package/dist/core/ports/normalizer.port.js +0 -3
  296. package/dist/core/ports/normalizer.port.js.map +0 -1
  297. package/dist/core/ports/pii-redactor.port.d.ts.map +0 -1
  298. package/dist/core/ports/pii-redactor.port.js +0 -3
  299. package/dist/core/ports/pii-redactor.port.js.map +0 -1
  300. package/dist/index.d.ts.map +0 -1
  301. package/dist/index.js.map +0 -1
  302. package/dist/infrastructure/cache/CacheManager.d.ts.map +0 -1
  303. package/dist/infrastructure/cache/CacheManager.js.map +0 -1
  304. package/dist/infrastructure/cache/InMemoryCache.d.ts.map +0 -1
  305. package/dist/infrastructure/cache/InMemoryCache.js.map +0 -1
  306. package/dist/infrastructure/cache/PersistentCache.d.ts.map +0 -1
  307. package/dist/infrastructure/cache/PersistentCache.js.map +0 -1
  308. package/dist/infrastructure/cache/RedisCache.d.ts.map +0 -1
  309. package/dist/infrastructure/cache/RedisCache.js.map +0 -1
  310. package/dist/infrastructure/cache/index.d.ts.map +0 -1
  311. package/dist/infrastructure/cache/index.js.map +0 -1
  312. package/dist/infrastructure/http/AuthenticationManager.d.ts.map +0 -1
  313. package/dist/infrastructure/http/AuthenticationManager.js.map +0 -1
  314. package/dist/infrastructure/http/BootstrapDiscovery.d.ts.map +0 -1
  315. package/dist/infrastructure/http/BootstrapDiscovery.js.map +0 -1
  316. package/dist/infrastructure/http/BrowserFetcher.d.ts.map +0 -1
  317. package/dist/infrastructure/http/BrowserFetcher.js.map +0 -1
  318. package/dist/infrastructure/http/BunFetcher.d.ts.map +0 -1
  319. package/dist/infrastructure/http/BunFetcher.js.map +0 -1
  320. package/dist/infrastructure/http/CircuitBreaker.d.ts.map +0 -1
  321. package/dist/infrastructure/http/CircuitBreaker.js.map +0 -1
  322. package/dist/infrastructure/http/CloudflareWorkersFetcher.d.ts.map +0 -1
  323. package/dist/infrastructure/http/CloudflareWorkersFetcher.js.map +0 -1
  324. package/dist/infrastructure/http/CompressionManager.d.ts.map +0 -1
  325. package/dist/infrastructure/http/CompressionManager.js.map +0 -1
  326. package/dist/infrastructure/http/ConnectionPool.d.ts.map +0 -1
  327. package/dist/infrastructure/http/ConnectionPool.js.map +0 -1
  328. package/dist/infrastructure/http/DenoFetcher.d.ts.map +0 -1
  329. package/dist/infrastructure/http/DenoFetcher.js.map +0 -1
  330. package/dist/infrastructure/http/Fetcher.d.ts.map +0 -1
  331. package/dist/infrastructure/http/Fetcher.js.map +0 -1
  332. package/dist/infrastructure/http/Normalizer.d.ts.map +0 -1
  333. package/dist/infrastructure/http/Normalizer.js.map +0 -1
  334. package/dist/infrastructure/http/ProxyManager.d.ts.map +0 -1
  335. package/dist/infrastructure/http/ProxyManager.js.map +0 -1
  336. package/dist/infrastructure/http/RateLimiter.d.ts.map +0 -1
  337. package/dist/infrastructure/http/RateLimiter.js.map +0 -1
  338. package/dist/infrastructure/http/RetryStrategy.d.ts.map +0 -1
  339. package/dist/infrastructure/http/RetryStrategy.js.map +0 -1
  340. package/dist/infrastructure/http/index.d.ts.map +0 -1
  341. package/dist/infrastructure/http/index.js.map +0 -1
  342. package/dist/infrastructure/logging/AuditLogger.d.ts.map +0 -1
  343. package/dist/infrastructure/logging/AuditLogger.js.map +0 -1
  344. package/dist/infrastructure/logging/Logger.d.ts.map +0 -1
  345. package/dist/infrastructure/logging/Logger.js.map +0 -1
  346. package/dist/infrastructure/monitoring/GrafanaDashboard.js.map +0 -1
  347. package/dist/infrastructure/monitoring/MetricsCollector.d.ts.map +0 -1
  348. package/dist/infrastructure/monitoring/MetricsCollector.js.map +0 -1
  349. package/dist/infrastructure/monitoring/PrometheusExporter.d.ts.map +0 -1
  350. package/dist/infrastructure/monitoring/PrometheusExporter.js.map +0 -1
  351. package/dist/infrastructure/monitoring/TelemetryExporter.d.ts.map +0 -1
  352. package/dist/infrastructure/monitoring/TelemetryExporter.js.map +0 -1
  353. package/dist/infrastructure/native/NativeBackend.d.ts.map +0 -1
  354. package/dist/infrastructure/native/NativeBackend.js.map +0 -1
  355. package/dist/infrastructure/security/PIIRedactor.d.ts.map +0 -1
  356. package/dist/infrastructure/security/PIIRedactor.js.map +0 -1
  357. package/dist/infrastructure/security/SSRFProtection.d.ts.map +0 -1
  358. package/dist/infrastructure/security/SSRFProtection.js.map +0 -1
  359. package/dist/infrastructure/security/index.d.ts.map +0 -1
  360. package/dist/infrastructure/security/index.js.map +0 -1
  361. package/dist/infrastructure/validation/ResponseValidator.d.ts.map +0 -1
  362. package/dist/infrastructure/validation/ResponseValidator.js.map +0 -1
  363. package/dist/integrations/express.d.ts.map +0 -1
  364. package/dist/integrations/express.js.map +0 -1
  365. package/dist/integrations/graphql.d.ts.map +0 -1
  366. package/dist/integrations/graphql.js.map +0 -1
  367. package/dist/integrations/nestjs.d.ts.map +0 -1
  368. package/dist/integrations/nestjs.js.map +0 -1
  369. package/dist/shared/constants/http.constants.d.ts.map +0 -1
  370. package/dist/shared/constants/http.constants.js.map +0 -1
  371. package/dist/shared/constants/index.d.ts.map +0 -1
  372. package/dist/shared/constants/index.js.map +0 -1
  373. package/dist/shared/constants/rdap.constants.d.ts.map +0 -1
  374. package/dist/shared/constants/rdap.constants.js.map +0 -1
  375. package/dist/shared/errors/base.error.d.ts.map +0 -1
  376. package/dist/shared/errors/base.error.js.map +0 -1
  377. package/dist/shared/errors/index.d.ts.map +0 -1
  378. package/dist/shared/errors/index.js.map +0 -1
  379. package/dist/shared/types/entities.d.ts.map +0 -1
  380. package/dist/shared/types/entities.js.map +0 -1
  381. package/dist/shared/types/enums.d.ts.map +0 -1
  382. package/dist/shared/types/enums.js.map +0 -1
  383. package/dist/shared/types/errors.d.ts.map +0 -1
  384. package/dist/shared/types/errors.js.map +0 -1
  385. package/dist/shared/types/generics.d.ts.map +0 -1
  386. package/dist/shared/types/generics.js.map +0 -1
  387. package/dist/shared/types/index.d.ts.map +0 -1
  388. package/dist/shared/types/index.js.map +0 -1
  389. package/dist/shared/types/options.d.ts.map +0 -1
  390. package/dist/shared/types/options.js.map +0 -1
  391. package/dist/shared/types/responses.d.ts.map +0 -1
  392. package/dist/shared/types/responses.js +0 -3
  393. package/dist/shared/types/responses.js.map +0 -1
  394. package/dist/shared/utils/deprecation.d.ts.map +0 -1
  395. package/dist/shared/utils/deprecation.js.map +0 -1
  396. package/dist/shared/utils/enhanced-validators.d.ts.map +0 -1
  397. package/dist/shared/utils/enhanced-validators.js.map +0 -1
  398. package/dist/shared/utils/helpers/async.d.ts.map +0 -1
  399. package/dist/shared/utils/helpers/async.js.map +0 -1
  400. package/dist/shared/utils/helpers/cache.d.ts.map +0 -1
  401. package/dist/shared/utils/helpers/cache.js.map +0 -1
  402. package/dist/shared/utils/helpers/format.d.ts.map +0 -1
  403. package/dist/shared/utils/helpers/format.js.map +0 -1
  404. package/dist/shared/utils/helpers/http.d.ts.map +0 -1
  405. package/dist/shared/utils/helpers/http.js.map +0 -1
  406. package/dist/shared/utils/helpers/index.d.ts.map +0 -1
  407. package/dist/shared/utils/helpers/index.js.map +0 -1
  408. package/dist/shared/utils/helpers/object.d.ts.map +0 -1
  409. package/dist/shared/utils/helpers/object.js.map +0 -1
  410. package/dist/shared/utils/helpers/runtime.d.ts.map +0 -1
  411. package/dist/shared/utils/helpers/runtime.js.map +0 -1
  412. package/dist/shared/utils/helpers/string.d.ts.map +0 -1
  413. package/dist/shared/utils/helpers/string.js.map +0 -1
  414. package/dist/shared/utils/validators/asn.d.ts.map +0 -1
  415. package/dist/shared/utils/validators/asn.js.map +0 -1
  416. package/dist/shared/utils/validators/config-validation.d.ts.map +0 -1
  417. package/dist/shared/utils/validators/config-validation.js.map +0 -1
  418. package/dist/shared/utils/validators/domain.d.ts.map +0 -1
  419. package/dist/shared/utils/validators/domain.js.map +0 -1
  420. package/dist/shared/utils/validators/entity.d.ts.map +0 -1
  421. package/dist/shared/utils/validators/entity.js.map +0 -1
  422. package/dist/shared/utils/validators/index.d.ts.map +0 -1
  423. package/dist/shared/utils/validators/index.js.map +0 -1
  424. package/dist/shared/utils/validators/ip.d.ts.map +0 -1
  425. package/dist/shared/utils/validators/ip.js.map +0 -1
  426. package/dist/shared/utils/validators/nameserver.d.ts.map +0 -1
  427. package/dist/shared/utils/validators/nameserver.js.map +0 -1
  428. package/dist/shared/utils/validators/network.d.ts.map +0 -1
  429. package/dist/shared/utils/validators/network.js.map +0 -1
  430. /package/dist/{application → types/application}/client/index.d.ts +0 -0
  431. /package/dist/{application → types/application}/deduplication/QueryDeduplicator.d.ts +0 -0
  432. /package/dist/{application → types/application}/hooks/MiddlewareHooks.d.ts +0 -0
  433. /package/dist/{application → types/application}/services/BatchProcessor.d.ts +0 -0
  434. /package/dist/{application → types/application}/services/QueryOrchestrator.d.ts +0 -0
  435. /package/dist/{application → types/application}/services/QueryPriority.d.ts +0 -0
  436. /package/dist/{application → types/application}/services/index.d.ts +0 -0
  437. /package/dist/{cli → types/cli}/index.d.ts +0 -0
  438. /package/dist/{core → types/core}/ports/bootstrap.port.d.ts +0 -0
  439. /package/dist/{core → types/core}/ports/cache.port.d.ts +0 -0
  440. /package/dist/{core → types/core}/ports/fetcher.port.d.ts +0 -0
  441. /package/dist/{core → types/core}/ports/index.d.ts +0 -0
  442. /package/dist/{core → types/core}/ports/normalizer.port.d.ts +0 -0
  443. /package/dist/{core → types/core}/ports/pii-redactor.port.d.ts +0 -0
  444. /package/dist/{infrastructure → types/infrastructure}/cache/CacheManager.d.ts +0 -0
  445. /package/dist/{infrastructure → types/infrastructure}/cache/InMemoryCache.d.ts +0 -0
  446. /package/dist/{infrastructure → types/infrastructure}/cache/PersistentCache.d.ts +0 -0
  447. /package/dist/{infrastructure → types/infrastructure}/cache/RedisCache.d.ts +0 -0
  448. /package/dist/{infrastructure → types/infrastructure}/cache/index.d.ts +0 -0
  449. /package/dist/{infrastructure → types/infrastructure}/http/AuthenticationManager.d.ts +0 -0
  450. /package/dist/{infrastructure → types/infrastructure}/http/BootstrapDiscovery.d.ts +0 -0
  451. /package/dist/{infrastructure → types/infrastructure}/http/BrowserFetcher.d.ts +0 -0
  452. /package/dist/{infrastructure → types/infrastructure}/http/BunFetcher.d.ts +0 -0
  453. /package/dist/{infrastructure → types/infrastructure}/http/CircuitBreaker.d.ts +0 -0
  454. /package/dist/{infrastructure → types/infrastructure}/http/CloudflareWorkersFetcher.d.ts +0 -0
  455. /package/dist/{infrastructure → types/infrastructure}/http/CompressionManager.d.ts +0 -0
  456. /package/dist/{infrastructure → types/infrastructure}/http/ConnectionPool.d.ts +0 -0
  457. /package/dist/{infrastructure → types/infrastructure}/http/DenoFetcher.d.ts +0 -0
  458. /package/dist/{infrastructure → types/infrastructure}/http/Normalizer.d.ts +0 -0
  459. /package/dist/{infrastructure → types/infrastructure}/http/ProxyManager.d.ts +0 -0
  460. /package/dist/{infrastructure → types/infrastructure}/http/RetryStrategy.d.ts +0 -0
  461. /package/dist/{infrastructure → types/infrastructure}/http/index.d.ts +0 -0
  462. /package/dist/{infrastructure → types/infrastructure}/logging/AuditLogger.d.ts +0 -0
  463. /package/dist/{infrastructure → types/infrastructure}/logging/Logger.d.ts +0 -0
  464. /package/dist/{infrastructure → types/infrastructure}/monitoring/GrafanaDashboard.d.ts +0 -0
  465. /package/dist/{infrastructure → types/infrastructure}/monitoring/MetricsCollector.d.ts +0 -0
  466. /package/dist/{infrastructure → types/infrastructure}/monitoring/PrometheusExporter.d.ts +0 -0
  467. /package/dist/{infrastructure → types/infrastructure}/monitoring/TelemetryExporter.d.ts +0 -0
  468. /package/dist/{infrastructure → types/infrastructure}/native/NativeBackend.d.ts +0 -0
  469. /package/dist/{infrastructure → types/infrastructure}/security/PIIRedactor.d.ts +0 -0
  470. /package/dist/{infrastructure → types/infrastructure}/security/index.d.ts +0 -0
  471. /package/dist/{infrastructure → types/infrastructure}/validation/ResponseValidator.d.ts +0 -0
  472. /package/dist/{integrations → types/integrations}/express.d.ts +0 -0
  473. /package/dist/{integrations → types/integrations}/graphql.d.ts +0 -0
  474. /package/dist/{integrations → types/integrations}/nestjs.d.ts +0 -0
  475. /package/dist/{shared → types/shared}/constants/http.constants.d.ts +0 -0
  476. /package/dist/{shared → types/shared}/constants/index.d.ts +0 -0
  477. /package/dist/{shared → types/shared}/constants/rdap.constants.d.ts +0 -0
  478. /package/dist/{shared → types/shared}/errors/index.d.ts +0 -0
  479. /package/dist/{shared → types/shared}/types/entities.d.ts +0 -0
  480. /package/dist/{shared → types/shared}/types/errors.d.ts +0 -0
  481. /package/dist/{shared → types/shared}/types/generics.d.ts +0 -0
  482. /package/dist/{shared → types/shared}/utils/deprecation.d.ts +0 -0
  483. /package/dist/{shared → types/shared}/utils/enhanced-validators.d.ts +0 -0
  484. /package/dist/{shared → types/shared}/utils/helpers/async.d.ts +0 -0
  485. /package/dist/{shared → types/shared}/utils/helpers/cache.d.ts +0 -0
  486. /package/dist/{shared → types/shared}/utils/helpers/format.d.ts +0 -0
  487. /package/dist/{shared → types/shared}/utils/helpers/http.d.ts +0 -0
  488. /package/dist/{shared → types/shared}/utils/helpers/index.d.ts +0 -0
  489. /package/dist/{shared → types/shared}/utils/helpers/object.d.ts +0 -0
  490. /package/dist/{shared → types/shared}/utils/helpers/runtime.d.ts +0 -0
  491. /package/dist/{shared → types/shared}/utils/helpers/string.d.ts +0 -0
  492. /package/dist/{shared → types/shared}/utils/validators/asn.d.ts +0 -0
  493. /package/dist/{shared → types/shared}/utils/validators/config-validation.d.ts +0 -0
  494. /package/dist/{shared → types/shared}/utils/validators/domain.d.ts +0 -0
  495. /package/dist/{shared → types/shared}/utils/validators/entity.d.ts +0 -0
  496. /package/dist/{shared → types/shared}/utils/validators/index.d.ts +0 -0
  497. /package/dist/{shared → types/shared}/utils/validators/ip.d.ts +0 -0
  498. /package/dist/{shared → types/shared}/utils/validators/nameserver.d.ts +0 -0
  499. /package/dist/{shared → types/shared}/utils/validators/network.d.ts +0 -0
@@ -0,0 +1,145 @@
1
+ export class BatchProcessor {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async processBatch(requests, options = {}) {
6
+ const { concurrency = 5, continueOnError = true, } = options;
7
+ const results = [];
8
+ const queue = [...requests];
9
+ const inProgress = [];
10
+ const processOne = async (request) => {
11
+ const startTime = Date.now();
12
+ try {
13
+ let result;
14
+ switch (request.type) {
15
+ case 'domain':
16
+ result = await this.client.domain(request.query);
17
+ break;
18
+ case 'ip':
19
+ result = await this.client.ip(request.query);
20
+ break;
21
+ case 'asn':
22
+ result = await this.client.asn(request.query);
23
+ break;
24
+ case 'nameserver':
25
+ result = await this.client.nameserver(request.query);
26
+ break;
27
+ case 'entity':
28
+ if (!request.serverUrl) {
29
+ throw new Error(`Entity queries require a serverUrl. Set { type: 'entity', query: '${request.query}', serverUrl: 'https://...' }`);
30
+ }
31
+ result = await this.client.entity(request.query, request.serverUrl);
32
+ break;
33
+ default:
34
+ throw new Error(`Unknown query type: ${request.type}`);
35
+ }
36
+ results.push({
37
+ type: request.type,
38
+ query: request.query,
39
+ result,
40
+ duration: Date.now() - startTime,
41
+ });
42
+ }
43
+ catch (error) {
44
+ results.push({
45
+ type: request.type,
46
+ query: request.query,
47
+ error: error,
48
+ duration: Date.now() - startTime,
49
+ });
50
+ if (!continueOnError) {
51
+ throw error;
52
+ }
53
+ }
54
+ };
55
+ while (queue.length > 0 || inProgress.length > 0) {
56
+ while (inProgress.length < concurrency && queue.length > 0) {
57
+ const request = queue.shift();
58
+ const promise = processOne(request);
59
+ inProgress.push(promise);
60
+ const cleanup = () => {
61
+ const index = inProgress.indexOf(promise);
62
+ if (index > -1) {
63
+ inProgress.splice(index, 1);
64
+ }
65
+ };
66
+ promise.then(cleanup, cleanup);
67
+ }
68
+ if (inProgress.length > 0) {
69
+ await Promise.race(inProgress);
70
+ }
71
+ }
72
+ return results;
73
+ }
74
+ async processBatchWithTimeout(requests, timeoutMs, options = {}) {
75
+ return Promise.race([
76
+ this.processBatch(requests, options),
77
+ new Promise((_, reject) => setTimeout(() => reject(new Error(`Batch processing timeout after ${timeoutMs}ms`)), timeoutMs)),
78
+ ]);
79
+ }
80
+ async executeOne(request) {
81
+ switch (request.type) {
82
+ case 'domain':
83
+ return this.client.domain(request.query);
84
+ case 'ip':
85
+ return this.client.ip(request.query);
86
+ case 'asn':
87
+ return this.client.asn(request.query);
88
+ case 'nameserver':
89
+ return this.client.nameserver(request.query);
90
+ case 'entity':
91
+ if (!request.serverUrl) {
92
+ throw new Error(`Entity queries require a serverUrl. Set { type: 'entity', query: '${request.query}', serverUrl: 'https://...' }`);
93
+ }
94
+ return this.client.entity(request.query, request.serverUrl);
95
+ default:
96
+ throw new Error(`Unknown query type: ${request.type}`);
97
+ }
98
+ }
99
+ async *streamBatch(requests, options = {}) {
100
+ const { concurrency = 5, continueOnError = true } = options;
101
+ const queue = [...requests];
102
+ while (queue.length > 0) {
103
+ const chunk = queue.splice(0, concurrency);
104
+ const results = await Promise.all(chunk.map(async (request) => {
105
+ const t0 = Date.now();
106
+ try {
107
+ const result = await this.executeOne(request);
108
+ return {
109
+ type: request.type,
110
+ query: request.query,
111
+ result,
112
+ duration: Date.now() - t0,
113
+ };
114
+ }
115
+ catch (error) {
116
+ if (!continueOnError)
117
+ throw error;
118
+ return {
119
+ type: request.type,
120
+ query: request.query,
121
+ error: error,
122
+ duration: Date.now() - t0,
123
+ };
124
+ }
125
+ }));
126
+ for (const result of results) {
127
+ yield result;
128
+ }
129
+ }
130
+ }
131
+ analyzeBatchResults(results) {
132
+ const successful = results.filter((r) => !r.error).length;
133
+ const failed = results.filter((r) => r.error).length;
134
+ const totalDuration = results.reduce((sum, r) => sum + r.duration, 0);
135
+ const averageDuration = results.length > 0 ? totalDuration / results.length : 0;
136
+ return {
137
+ total: results.length,
138
+ successful,
139
+ failed,
140
+ averageDuration,
141
+ totalDuration,
142
+ successRate: results.length > 0 ? (successful / results.length) * 100 : 0,
143
+ };
144
+ }
145
+ }