rdapify 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -28
- package/LICENSE +201 -21
- package/README.ar.md +1 -1
- package/README.md +21 -3
- package/dist/cjs/application/client/RDAPClient.js +7 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/infrastructure/http/Fetcher.js +32 -3
- package/dist/cjs/infrastructure/security/SSRFProtection.js +1 -1
- package/dist/cjs/infrastructure/telemetry/UsageTelemetry.js +2 -1
- package/dist/cjs/shared/constants/index.js +1 -0
- package/dist/cjs/shared/constants/version.constants.js +4 -0
- package/dist/cjs/shared/types/options.js +8 -1
- package/dist/cjs/shared/utils/validators/network.js +14 -0
- package/dist/esm/application/client/RDAPClient.js +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/infrastructure/http/Fetcher.js +32 -3
- package/dist/esm/infrastructure/security/SSRFProtection.js +1 -1
- package/dist/esm/infrastructure/telemetry/UsageTelemetry.js +2 -1
- package/dist/esm/shared/constants/index.js +1 -0
- package/dist/esm/shared/constants/version.constants.js +1 -0
- package/dist/esm/shared/types/options.js +8 -1
- package/dist/esm/shared/utils/validators/network.js +14 -0
- package/dist/types/application/client/RDAPClient.d.ts +3 -0
- package/dist/types/application/client/RDAPClient.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/infrastructure/http/Fetcher.d.ts +11 -0
- package/dist/types/infrastructure/http/Fetcher.d.ts.map +1 -1
- package/dist/types/infrastructure/security/SSRFProtection.d.ts.map +1 -1
- package/dist/types/infrastructure/telemetry/UsageTelemetry.d.ts.map +1 -1
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/constants/index.d.ts.map +1 -1
- package/dist/types/shared/constants/version.constants.d.ts +2 -0
- package/dist/types/shared/constants/version.constants.d.ts.map +1 -0
- package/dist/types/shared/types/options.d.ts +6 -0
- package/dist/types/shared/types/options.d.ts.map +1 -1
- package/dist/types/shared/utils/validators/network.d.ts.map +1 -1
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0] - 2026-04-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Modular workspace architecture (11-crate Rust workspace)
|
|
14
|
+
- Feature flags system (`memory-cache`, `stream`, `batch`, `rate-limit`, `sqlite`, `service`)
|
|
15
|
+
- RDAP JSON validation layer
|
|
16
|
+
- Configuration system (`rdapify.toml` + env overrides)
|
|
17
|
+
- Structured logging (JSON/text via `rdap-logging`)
|
|
18
|
+
- Prometheus metrics (`rdap_queries_total`, `rdap_cache_hits_total`, latency histograms)
|
|
19
|
+
- Benchmarks via Criterion (`cache`, `ssrf`, `query`, `streaming`, `batch`, `bootstrap`)
|
|
20
|
+
|
|
21
|
+
### Security
|
|
22
|
+
- SSRF protection (URL + DNS pre-resolution validation)
|
|
23
|
+
- DNS rebinding protection
|
|
24
|
+
- HTTP redirect chain validation
|
|
25
|
+
- Response size limits
|
|
26
|
+
- `#![forbid(unsafe_code)]` across all crates
|
|
27
|
+
|
|
28
|
+
### Performance
|
|
29
|
+
- In-memory DashMap cache with TTL
|
|
30
|
+
- Connection reuse across RDAP queries
|
|
31
|
+
- Binary size optimization (LTO, `opt-level = "z"`, strip, `panic = "abort"`)
|
|
32
|
+
|
|
33
|
+
### Internal
|
|
34
|
+
- MSRV raised to 1.77
|
|
35
|
+
- Build matrix (Ubuntu, macOS, Windows)
|
|
36
|
+
- `rdapify.toml` config file support
|
|
37
|
+
|
|
10
38
|
## [0.3.2] - 2026-03-24
|
|
11
39
|
|
|
12
40
|
### Fixed
|
|
@@ -24,25 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
24
52
|
- `docs.yml`: removed `|| true` fallbacks that silently hid link-check and
|
|
25
53
|
markdownlint failures
|
|
26
54
|
|
|
27
|
-
## [
|
|
28
|
-
|
|
29
|
-
### Summary
|
|
30
|
-
API freeze release. `RDAPClient` interface is stable and guaranteed not to
|
|
31
|
-
have breaking changes in subsequent 1.x releases. All 83 public exports are
|
|
32
|
-
classified in `API_STABILITY_ANALYSIS.md`.
|
|
33
|
-
|
|
34
|
-
### Highlights
|
|
35
|
-
- **Branch coverage**: ≥ 90% (1066 tests).
|
|
36
|
-
- **API freeze**: 83 exports locked; all deprecated APIs removed.
|
|
37
|
-
- **Runtime support**: Node.js (confirmed), Bun/Deno/Cloudflare Workers (verified externally).
|
|
38
|
-
- **Security Audit**: all critical/high findings resolved (requires external audit completion).
|
|
39
|
-
- **Documentation**: complete Arabic and English docs at rdapify.com.
|
|
40
|
-
|
|
41
|
-
### Breaking Changes (from 0.3.1)
|
|
42
|
-
All APIs marked `@deprecated` in v0.3.1 are removed in v1.0.0.
|
|
43
|
-
See `MIGRATION_1_0.md` (to be published with release).
|
|
44
|
-
|
|
45
|
-
## [0.3.1] - unreleased
|
|
55
|
+
## [0.3.1] - 2026-03-23
|
|
46
56
|
|
|
47
57
|
### Deprecated
|
|
48
58
|
|
|
@@ -69,7 +79,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
69
79
|
|
|
70
80
|
- Branch coverage increased to **80.25%** (above the 80% jest threshold) by adding targeted tests for previously uncovered branches across `Logger`, `MetricsCollector`, `nestjs.ts`, `nameserver.ts`, `express.ts`, `BatchProcessor`, and `QueryPriority` modules
|
|
71
81
|
|
|
72
|
-
## [0.3.0] -
|
|
82
|
+
## [0.3.0] - 2026-03-22
|
|
73
83
|
|
|
74
84
|
### Added
|
|
75
85
|
|
|
@@ -83,7 +93,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
83
93
|
- **42 new unit tests**: streaming batch (10), Prometheus exporter (10), TelemetryExporter (9), deprecation (7), multi-region bootstrap (5)
|
|
84
94
|
- **API snapshot updated** — 82 exported symbols
|
|
85
95
|
|
|
86
|
-
## [0.2.3] -
|
|
96
|
+
## [0.2.3] - 2026-03-22
|
|
87
97
|
|
|
88
98
|
### Added
|
|
89
99
|
|
|
@@ -97,7 +107,11 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
97
107
|
- **7 new public exports**: `createRdapifySchema`, `RDAPIFY_TYPE_DEFS`, `RdapifyResolvers` (type), `rdapifyExpress`, `MinimalRouter`, `RouterLike` (type), `RequestLike` (type), `ResponseLike` (type), `RdapifyModule`, `InjectRdapClient`, `RDAPIFY_CLIENT_TOKEN`, `RdapifyModuleOptions` (type), `RdapifyDynamicModule` (type)
|
|
98
108
|
- **API snapshot updated** — 78 exported symbols
|
|
99
109
|
|
|
100
|
-
## [0.2.2] -
|
|
110
|
+
## [0.2.2] - 2026-03-22
|
|
111
|
+
|
|
112
|
+
> **Note:** Versions 0.1.9 through 0.2.2 were published in a batch on the same
|
|
113
|
+
> day (2026-03-22) from the same commit (bb7d250dc). Changelog entries reflect
|
|
114
|
+
> the intended scope of each version.
|
|
101
115
|
|
|
102
116
|
### Added
|
|
103
117
|
|
|
@@ -107,7 +121,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
107
121
|
- **Priority order** — fetcher auto-selection order: Cloudflare Workers → Deno → Bun → Node.js (standard `Fetcher`)
|
|
108
122
|
- **22 new unit tests**: DenoFetcher (9 tests), CloudflareWorkersFetcher (13 tests)
|
|
109
123
|
|
|
110
|
-
## [0.2.1] -
|
|
124
|
+
## [0.2.1] - 2026-03-22
|
|
111
125
|
|
|
112
126
|
### Added
|
|
113
127
|
|
|
@@ -116,7 +130,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
116
130
|
- **CI Bun job** — `.github/workflows/ci.yml` now includes a `test-bun` job that installs dependencies with `bun install` and runs the unit test suite under Bun
|
|
117
131
|
- **14 unit tests** for `BunFetcher`: `resolveFetch()` detection (Bun present / absent / non-function), successful fetch, header forwarding, custom headers, 4xx/5xx → `RDAPServerError`, timeout → `TimeoutError`, generic error → `NetworkError`, SSRF protection integration, Bun.fetch preference over global fetch
|
|
118
132
|
|
|
119
|
-
## [0.2.0] -
|
|
133
|
+
## [0.2.0] - 2026-03-22
|
|
120
134
|
|
|
121
135
|
### Added
|
|
122
136
|
|
|
@@ -129,7 +143,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
129
143
|
- **`QueryAbortedError`** exported from public API
|
|
130
144
|
- **63 new unit tests**: circuit breaker state transitions (14), middleware abort + priority (14), Redis key compression + pipeline (17), HTTP/2 (5), middleware hooks compatibility fix (2)
|
|
131
145
|
|
|
132
|
-
## [0.1.9] -
|
|
146
|
+
## [0.1.9] - 2026-03-22
|
|
133
147
|
|
|
134
148
|
### Added
|
|
135
149
|
|
|
@@ -434,7 +448,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
434
448
|
- **Query Prioritization**: Critical queries execute first
|
|
435
449
|
- **Persistent Cache**: Faster startup with pre-loaded cache
|
|
436
450
|
|
|
437
|
-
## [0.1.0] - 2025-
|
|
451
|
+
## [0.1.0] - 2025-12-05
|
|
438
452
|
|
|
439
453
|
### Added
|
|
440
454
|
- Initial public release of RDAPify
|
|
@@ -485,7 +499,7 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
485
499
|
- Mocked fixtures for reliable testing
|
|
486
500
|
- Coverage reporting
|
|
487
501
|
|
|
488
|
-
## [0.1.0-alpha.4] -
|
|
502
|
+
## [0.1.0-alpha.4] - 2026-01-23
|
|
489
503
|
|
|
490
504
|
### Added
|
|
491
505
|
- Dependabot configuration for automated dependency updates
|
|
@@ -564,4 +578,25 @@ or `console.warn` (other runtimes) at most once per process lifetime.
|
|
|
564
578
|
|
|
565
579
|
---
|
|
566
580
|
|
|
567
|
-
[
|
|
581
|
+
[Unreleased]: https://github.com/rdapify/RDAPify/compare/v0.4.0...HEAD
|
|
582
|
+
[0.4.0]: https://github.com/rdapify/RDAPify/compare/v0.3.2...v0.4.0
|
|
583
|
+
[0.3.2]: https://github.com/rdapify/RDAPify/compare/v0.3.1...v0.3.2
|
|
584
|
+
[0.3.1]: https://github.com/rdapify/RDAPify/compare/v0.3.0...v0.3.1
|
|
585
|
+
[0.3.0]: https://github.com/rdapify/RDAPify/compare/v0.2.3...v0.3.0
|
|
586
|
+
[0.2.3]: https://github.com/rdapify/RDAPify/compare/v0.2.2...v0.2.3
|
|
587
|
+
[0.2.2]: https://github.com/rdapify/RDAPify/compare/v0.2.1...v0.2.2
|
|
588
|
+
[0.2.1]: https://github.com/rdapify/RDAPify/compare/v0.2.0...v0.2.1
|
|
589
|
+
[0.2.0]: https://github.com/rdapify/RDAPify/compare/v0.1.9...v0.2.0
|
|
590
|
+
[0.1.9]: https://github.com/rdapify/RDAPify/compare/v0.1.8...v0.1.9
|
|
591
|
+
[0.1.8]: https://github.com/rdapify/RDAPify/compare/v0.1.7...v0.1.8
|
|
592
|
+
[0.1.7]: https://github.com/rdapify/RDAPify/compare/v0.1.6...v0.1.7
|
|
593
|
+
[0.1.6]: https://github.com/rdapify/RDAPify/compare/v0.1.5...v0.1.6
|
|
594
|
+
[0.1.5]: https://github.com/rdapify/RDAPify/compare/v0.1.4...v0.1.5
|
|
595
|
+
[0.1.4]: https://github.com/rdapify/RDAPify/compare/v0.1.3...v0.1.4
|
|
596
|
+
[0.1.3]: https://github.com/rdapify/RDAPify/compare/v0.1.2...v0.1.3
|
|
597
|
+
[0.1.2]: https://github.com/rdapify/RDAPify/compare/v0.1.1...v0.1.2
|
|
598
|
+
[0.1.1]: https://github.com/rdapify/RDAPify/compare/v0.1.0...v0.1.1
|
|
599
|
+
[0.1.0]: https://github.com/rdapify/RDAPify/compare/v0.1.0-alpha.4...v0.1.0
|
|
600
|
+
[0.1.0-alpha.4]: https://github.com/rdapify/RDAPify/compare/v0.1.0-alpha.2...v0.1.0-alpha.4
|
|
601
|
+
[0.1.0-alpha.2]: https://github.com/rdapify/RDAPify/compare/v0.1.0-alpha.1...v0.1.0-alpha.2
|
|
602
|
+
[0.1.0-alpha.1]: https://github.com/rdapify/RDAPify/releases/tag/v0.1.0-alpha.1
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,201 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.ar.md
CHANGED
|
@@ -558,7 +558,7 @@ cat node_modules/rdapify/package.json | grep version
|
|
|
558
558
|
|
|
559
559
|
## 📜 الترخيص
|
|
560
560
|
|
|
561
|
-
RDAPify مرخصة تحت [
|
|
561
|
+
RDAPify مرخصة تحت [Apache License 2.0](LICENSE) — حرة للاستخدام الشخصي والتجاري مع ضمانات براءات الاختراع الصريحة.
|
|
562
562
|
|
|
563
563
|
## 🙏 شكر خاص
|
|
564
564
|
|
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
> **⚠️ Deprecated — This repository is archived.**
|
|
2
|
+
>
|
|
3
|
+
> The TypeScript library (`rdapify` on npm) is no longer maintained.
|
|
4
|
+
> Future Node.js support is provided via **[`rdapify-nd`](https://www.npmjs.com/package/rdapify-nd)** — a native Rust binding (napi-rs) with no JavaScript overhead.
|
|
5
|
+
>
|
|
6
|
+
> The canonical RDAPify engine is now **[github.com/rdapify/RDAPify](https://github.com/rdapify/RDAPify)** (Rust).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
<p align="center">
|
|
2
11
|
<img src="website/static/img/logo-512.png" alt="RDAPify" width="80" />
|
|
3
12
|
</p>
|
|
4
|
-
<h1 align="center">RDAPify</h1>
|
|
5
|
-
<p align="center"><strong>Unified, Secure, High-Performance RDAP Client</strong></p>
|
|
13
|
+
<h1 align="center">RDAPify <em>(archived)</em></h1>
|
|
14
|
+
<p align="center"><strong>Unified, Secure, High-Performance RDAP Client — TypeScript (archived)</strong></p>
|
|
6
15
|
|
|
7
16
|
[](https://www.npmjs.com/package/rdapify)
|
|
8
17
|
[](https://www.npmjs.com/package/rdapify)
|
|
@@ -61,6 +70,15 @@ pnpm add rdapify
|
|
|
61
70
|
bun add rdapify
|
|
62
71
|
```
|
|
63
72
|
|
|
73
|
+
## Compatibility
|
|
74
|
+
|
|
75
|
+
| rdapify | @rdapify/pro | rdapify-nd | rdapify-py |
|
|
76
|
+
|---------|-------------|------------|------------|
|
|
77
|
+
| 0.4.x | 0.4.x | 0.4.x | 0.4.x |
|
|
78
|
+
| 0.3.x | 0.2.x | 0.1.x | 0.2.x |
|
|
79
|
+
|
|
80
|
+
**MSRV (Rust):** 1.77 — applies to `rdapify-nd`, `rdapify-py`, and `@rdapify/pro`
|
|
81
|
+
|
|
64
82
|
## ⚡ Get Started in 30 Seconds
|
|
65
83
|
|
|
66
84
|
### Basic Usage
|
|
@@ -637,7 +655,7 @@ We're looking for early adopters and beta testers! If you're interested in:
|
|
|
637
655
|
|
|
638
656
|
## 📜 License
|
|
639
657
|
|
|
640
|
-
RDAPify is licensed under the [
|
|
658
|
+
RDAPify is licensed under the [Apache License 2.0](LICENSE) — free for personal and commercial use with explicit patent grants.
|
|
641
659
|
|
|
642
660
|
## 🙏 Acknowledgements
|
|
643
661
|
|
|
@@ -105,6 +105,7 @@ class RDAPClient {
|
|
|
105
105
|
ssrfProtection: this.ssrfProtection,
|
|
106
106
|
http2: this.options.http2,
|
|
107
107
|
signal: this.options.signal,
|
|
108
|
+
circuitBreaker: this.options.circuitBreaker,
|
|
108
109
|
logRedirect: (fromUrl, toUrl) => {
|
|
109
110
|
this.logger?.warn(`Redirect: ${fromUrl} → ${toUrl}`);
|
|
110
111
|
if (this.debugEnabled && this.debugLogger) {
|
|
@@ -456,6 +457,12 @@ class RDAPClient {
|
|
|
456
457
|
getDeduplicatorStats() {
|
|
457
458
|
return this.queryDeduplicator.getStats();
|
|
458
459
|
}
|
|
460
|
+
getCircuitBreakerStats() {
|
|
461
|
+
if (this.fetcher instanceof http_1.Fetcher) {
|
|
462
|
+
return this.fetcher.getCircuitBreakerStats();
|
|
463
|
+
}
|
|
464
|
+
return {};
|
|
465
|
+
}
|
|
459
466
|
getLogger() {
|
|
460
467
|
return this.logger;
|
|
461
468
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -39,7 +39,8 @@ Object.defineProperty(exports, "normalizeNameserver", { enumerable: true, get: f
|
|
|
39
39
|
Object.defineProperty(exports, "normalizeEntityHandle", { enumerable: true, get: function () { return validators_1.normalizeEntityHandle; } });
|
|
40
40
|
var UsageTelemetry_1 = require("./infrastructure/telemetry/UsageTelemetry");
|
|
41
41
|
Object.defineProperty(exports, "UsageTelemetry", { enumerable: true, get: function () { return UsageTelemetry_1.UsageTelemetry; } });
|
|
42
|
-
|
|
42
|
+
var version_constants_1 = require("./shared/constants/version.constants");
|
|
43
|
+
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_constants_1.VERSION; } });
|
|
43
44
|
var BatchProcessor_1 = require("./application/services/BatchProcessor");
|
|
44
45
|
Object.defineProperty(exports, "BatchProcessor", { enumerable: true, get: function () { return BatchProcessor_1.BatchProcessor; } });
|
|
45
46
|
var RateLimiter_1 = require("./infrastructure/http/RateLimiter");
|
|
@@ -3,14 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Fetcher = void 0;
|
|
4
4
|
const errors_1 = require("../../shared/errors");
|
|
5
5
|
const helpers_1 = require("../../shared/utils/helpers");
|
|
6
|
+
const version_constants_1 = require("../../shared/constants/version.constants");
|
|
7
|
+
const CircuitBreaker_1 = require("./CircuitBreaker");
|
|
6
8
|
class Fetcher {
|
|
7
9
|
constructor(options = {}) {
|
|
10
|
+
this.circuits = new Map();
|
|
8
11
|
this.timeout = {
|
|
9
12
|
connect: options.timeout?.connect || 5000,
|
|
10
13
|
request: options.timeout?.request || 10000,
|
|
11
14
|
dns: options.timeout?.dns || 3000,
|
|
12
15
|
};
|
|
13
|
-
this.userAgent = options.userAgent ||
|
|
16
|
+
this.userAgent = options.userAgent || `RDAPify/${version_constants_1.VERSION} (https://rdapify.com)`;
|
|
14
17
|
this.headers = options.headers || {};
|
|
15
18
|
this.followRedirects = options.followRedirects ?? true;
|
|
16
19
|
this.maxRedirects = options.maxRedirects || 5;
|
|
@@ -18,22 +21,48 @@ class Fetcher {
|
|
|
18
21
|
this.logRedirect = options.logRedirect;
|
|
19
22
|
this.http2 = options.http2 ?? false;
|
|
20
23
|
this.signal = options.signal;
|
|
24
|
+
this.cbOptions = options.circuitBreaker !== undefined ? options.circuitBreaker : {};
|
|
25
|
+
}
|
|
26
|
+
getCircuit(url) {
|
|
27
|
+
if (this.cbOptions === false)
|
|
28
|
+
return null;
|
|
29
|
+
let origin;
|
|
30
|
+
try {
|
|
31
|
+
origin = new URL(url).origin;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
if (!this.circuits.has(origin)) {
|
|
37
|
+
this.circuits.set(origin, new CircuitBreaker_1.CircuitBreaker(this.cbOptions));
|
|
38
|
+
}
|
|
39
|
+
return this.circuits.get(origin);
|
|
21
40
|
}
|
|
22
41
|
async fetch(url) {
|
|
23
42
|
if (this.ssrfProtection) {
|
|
24
43
|
await this.ssrfProtection.validateUrl(url);
|
|
25
44
|
}
|
|
45
|
+
const circuit = this.getCircuit(url);
|
|
26
46
|
try {
|
|
27
|
-
const response =
|
|
47
|
+
const response = circuit
|
|
48
|
+
? await circuit.execute(() => this.makeRequest(url))
|
|
49
|
+
: await this.makeRequest(url);
|
|
28
50
|
return response;
|
|
29
51
|
}
|
|
30
52
|
catch (error) {
|
|
31
|
-
if (error instanceof errors_1.RDAPifyError) {
|
|
53
|
+
if (error instanceof errors_1.RDAPifyError || error instanceof CircuitBreaker_1.CircuitOpenError) {
|
|
32
54
|
throw error;
|
|
33
55
|
}
|
|
34
56
|
throw new errors_1.NetworkError(`Failed to fetch RDAP data: ${error instanceof Error ? error.message : 'Unknown error'}`, undefined, { url, originalError: error });
|
|
35
57
|
}
|
|
36
58
|
}
|
|
59
|
+
getCircuitBreakerStats() {
|
|
60
|
+
const stats = {};
|
|
61
|
+
for (const [origin, cb] of this.circuits) {
|
|
62
|
+
stats[origin] = { state: cb.getState() };
|
|
63
|
+
}
|
|
64
|
+
return stats;
|
|
65
|
+
}
|
|
37
66
|
async makeRequest(url, redirectCount = 0) {
|
|
38
67
|
if (redirectCount > this.maxRedirects) {
|
|
39
68
|
throw new errors_1.NetworkError(`Too many redirects (max: ${this.maxRedirects})`, undefined, { url });
|
|
@@ -14,7 +14,7 @@ class SSRFProtection {
|
|
|
14
14
|
blockLinkLocal: options.blockLinkLocal ?? true,
|
|
15
15
|
blockedDomains: options.blockedDomains || [],
|
|
16
16
|
allowedDomains: options.allowedDomains || [],
|
|
17
|
-
dnsRebinding: options.dnsRebinding ??
|
|
17
|
+
dnsRebinding: options.dnsRebinding ?? (typeof globalThis.window === 'undefined'),
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
async validateUrl(url) {
|
|
@@ -6,12 +6,13 @@ const fs = tslib_1.__importStar(require("fs"));
|
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
7
|
const os = tslib_1.__importStar(require("os"));
|
|
8
8
|
const crypto = tslib_1.__importStar(require("crypto"));
|
|
9
|
+
const version_constants_1 = require("../../shared/constants/version.constants");
|
|
9
10
|
class UsageTelemetry {
|
|
10
11
|
static getPayload() {
|
|
11
12
|
const cfg = UsageTelemetry.loadConfig();
|
|
12
13
|
return {
|
|
13
14
|
installId: cfg.installId,
|
|
14
|
-
rdapifyVersion:
|
|
15
|
+
rdapifyVersion: version_constants_1.VERSION,
|
|
15
16
|
nodeVersion: process.version,
|
|
16
17
|
platform: process.platform,
|
|
17
18
|
queryTypesUsed: cfg.queryTypesUsed,
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./rdap.constants"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./http.constants"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./version.constants"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_OPTIONS = void 0;
|
|
4
|
+
const version_constants_1 = require("../constants/version.constants");
|
|
4
5
|
exports.DEFAULT_OPTIONS = {
|
|
5
6
|
cache: {
|
|
6
7
|
strategy: 'memory',
|
|
@@ -44,7 +45,7 @@ exports.DEFAULT_OPTIONS = {
|
|
|
44
45
|
debug: {
|
|
45
46
|
enabled: false,
|
|
46
47
|
},
|
|
47
|
-
userAgent:
|
|
48
|
+
userAgent: `RDAPify/${version_constants_1.VERSION} (https://rdapify.com)`,
|
|
48
49
|
includeRaw: false,
|
|
49
50
|
followRedirects: true,
|
|
50
51
|
maxRedirects: 5,
|
|
@@ -66,4 +67,10 @@ exports.DEFAULT_OPTIONS = {
|
|
|
66
67
|
usageTelemetry: {
|
|
67
68
|
enabled: false,
|
|
68
69
|
},
|
|
70
|
+
circuitBreaker: {
|
|
71
|
+
failureThreshold: 5,
|
|
72
|
+
successThreshold: 1,
|
|
73
|
+
halfOpenTimeout: 30000,
|
|
74
|
+
window: 60000,
|
|
75
|
+
},
|
|
69
76
|
};
|
|
@@ -5,6 +5,12 @@ exports.isLocalhost = isLocalhost;
|
|
|
5
5
|
exports.isLinkLocal = isLinkLocal;
|
|
6
6
|
function isPrivateIP(ip) {
|
|
7
7
|
const trimmed = ip.trim();
|
|
8
|
+
if (trimmed.toLowerCase().startsWith('::ffff:')) {
|
|
9
|
+
const ipv4Part = trimmed.slice(7);
|
|
10
|
+
if (ipv4Part.includes('.')) {
|
|
11
|
+
return isPrivateIP(ipv4Part);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
8
14
|
if (trimmed.includes('.')) {
|
|
9
15
|
const parts = trimmed.split('.').map((p) => parseInt(p, 10));
|
|
10
16
|
if (parts[0] === 10)
|
|
@@ -14,6 +20,14 @@ function isPrivateIP(ip) {
|
|
|
14
20
|
return true;
|
|
15
21
|
if (parts[0] === 192 && parts[1] === 168)
|
|
16
22
|
return true;
|
|
23
|
+
const part1Cgn = parts[1];
|
|
24
|
+
if (parts[0] === 100 && part1Cgn !== undefined && part1Cgn >= 64 && part1Cgn <= 127)
|
|
25
|
+
return true;
|
|
26
|
+
const part1Bench = parts[1];
|
|
27
|
+
if (parts[0] === 198 && part1Bench !== undefined && part1Bench >= 18 && part1Bench <= 19)
|
|
28
|
+
return true;
|
|
29
|
+
if (parts[0] === 0)
|
|
30
|
+
return true;
|
|
17
31
|
return false;
|
|
18
32
|
}
|
|
19
33
|
if (trimmed.includes(':')) {
|
|
@@ -69,6 +69,7 @@ export class RDAPClient {
|
|
|
69
69
|
ssrfProtection: this.ssrfProtection,
|
|
70
70
|
http2: this.options.http2,
|
|
71
71
|
signal: this.options.signal,
|
|
72
|
+
circuitBreaker: this.options.circuitBreaker,
|
|
72
73
|
logRedirect: (fromUrl, toUrl) => {
|
|
73
74
|
this.logger?.warn(`Redirect: ${fromUrl} → ${toUrl}`);
|
|
74
75
|
if (this.debugEnabled && this.debugLogger) {
|
|
@@ -420,6 +421,12 @@ export class RDAPClient {
|
|
|
420
421
|
getDeduplicatorStats() {
|
|
421
422
|
return this.queryDeduplicator.getStats();
|
|
422
423
|
}
|
|
424
|
+
getCircuitBreakerStats() {
|
|
425
|
+
if (this.fetcher instanceof Fetcher) {
|
|
426
|
+
return this.fetcher.getCircuitBreakerStats();
|
|
427
|
+
}
|
|
428
|
+
return {};
|
|
429
|
+
}
|
|
423
430
|
getLogger() {
|
|
424
431
|
return this.logger;
|
|
425
432
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { RDAPClient } from './application/client';
|
|
|
2
2
|
export { RDAPifyError, SSRFProtectionError, NetworkError, TimeoutError, RDAPServerError, NoServerFoundError, ValidationError, ParseError, CacheError, RateLimitError, SearchNotSupportedError, isRDAPifyError, isSSRFProtectionError, isNetworkError, isTimeoutError, isRateLimitError, } from './shared/errors';
|
|
3
3
|
export { validateDomain, validateIP, validateIPv4, validateIPv6, validateASN, validateNameserver, validateEntityHandle, isPrivateIP, isLocalhost, isLinkLocal, normalizeDomain, normalizeIP, normalizeASN, normalizeNameserver, normalizeEntityHandle, } from './shared/utils/validators';
|
|
4
4
|
export { UsageTelemetry } from './infrastructure/telemetry/UsageTelemetry';
|
|
5
|
-
export
|
|
5
|
+
export { VERSION } from './shared/constants/version.constants';
|
|
6
6
|
export { BatchProcessor } from './application/services/BatchProcessor';
|
|
7
7
|
export { RateLimiter } from './infrastructure/http/RateLimiter';
|
|
8
8
|
export { DistributedRateLimiter } from './infrastructure/http/DistributedRateLimiter';
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NetworkError, TimeoutError, RDAPServerError, RDAPifyError, QueryAbortedError } from '../../shared/errors';
|
|
2
2
|
import { withTimeout } from '../../shared/utils/helpers';
|
|
3
|
+
import { VERSION } from '../../shared/constants/version.constants';
|
|
4
|
+
import { CircuitBreaker, CircuitOpenError } from './CircuitBreaker';
|
|
3
5
|
export class Fetcher {
|
|
4
6
|
constructor(options = {}) {
|
|
7
|
+
this.circuits = new Map();
|
|
5
8
|
this.timeout = {
|
|
6
9
|
connect: options.timeout?.connect || 5000,
|
|
7
10
|
request: options.timeout?.request || 10000,
|
|
8
11
|
dns: options.timeout?.dns || 3000,
|
|
9
12
|
};
|
|
10
|
-
this.userAgent = options.userAgent ||
|
|
13
|
+
this.userAgent = options.userAgent || `RDAPify/${VERSION} (https://rdapify.com)`;
|
|
11
14
|
this.headers = options.headers || {};
|
|
12
15
|
this.followRedirects = options.followRedirects ?? true;
|
|
13
16
|
this.maxRedirects = options.maxRedirects || 5;
|
|
@@ -15,22 +18,48 @@ export class Fetcher {
|
|
|
15
18
|
this.logRedirect = options.logRedirect;
|
|
16
19
|
this.http2 = options.http2 ?? false;
|
|
17
20
|
this.signal = options.signal;
|
|
21
|
+
this.cbOptions = options.circuitBreaker !== undefined ? options.circuitBreaker : {};
|
|
22
|
+
}
|
|
23
|
+
getCircuit(url) {
|
|
24
|
+
if (this.cbOptions === false)
|
|
25
|
+
return null;
|
|
26
|
+
let origin;
|
|
27
|
+
try {
|
|
28
|
+
origin = new URL(url).origin;
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
if (!this.circuits.has(origin)) {
|
|
34
|
+
this.circuits.set(origin, new CircuitBreaker(this.cbOptions));
|
|
35
|
+
}
|
|
36
|
+
return this.circuits.get(origin);
|
|
18
37
|
}
|
|
19
38
|
async fetch(url) {
|
|
20
39
|
if (this.ssrfProtection) {
|
|
21
40
|
await this.ssrfProtection.validateUrl(url);
|
|
22
41
|
}
|
|
42
|
+
const circuit = this.getCircuit(url);
|
|
23
43
|
try {
|
|
24
|
-
const response =
|
|
44
|
+
const response = circuit
|
|
45
|
+
? await circuit.execute(() => this.makeRequest(url))
|
|
46
|
+
: await this.makeRequest(url);
|
|
25
47
|
return response;
|
|
26
48
|
}
|
|
27
49
|
catch (error) {
|
|
28
|
-
if (error instanceof RDAPifyError) {
|
|
50
|
+
if (error instanceof RDAPifyError || error instanceof CircuitOpenError) {
|
|
29
51
|
throw error;
|
|
30
52
|
}
|
|
31
53
|
throw new NetworkError(`Failed to fetch RDAP data: ${error instanceof Error ? error.message : 'Unknown error'}`, undefined, { url, originalError: error });
|
|
32
54
|
}
|
|
33
55
|
}
|
|
56
|
+
getCircuitBreakerStats() {
|
|
57
|
+
const stats = {};
|
|
58
|
+
for (const [origin, cb] of this.circuits) {
|
|
59
|
+
stats[origin] = { state: cb.getState() };
|
|
60
|
+
}
|
|
61
|
+
return stats;
|
|
62
|
+
}
|
|
34
63
|
async makeRequest(url, redirectCount = 0) {
|
|
35
64
|
if (redirectCount > this.maxRedirects) {
|
|
36
65
|
throw new NetworkError(`Too many redirects (max: ${this.maxRedirects})`, undefined, { url });
|
|
@@ -10,7 +10,7 @@ export class SSRFProtection {
|
|
|
10
10
|
blockLinkLocal: options.blockLinkLocal ?? true,
|
|
11
11
|
blockedDomains: options.blockedDomains || [],
|
|
12
12
|
allowedDomains: options.allowedDomains || [],
|
|
13
|
-
dnsRebinding: options.dnsRebinding ??
|
|
13
|
+
dnsRebinding: options.dnsRebinding ?? (typeof globalThis.window === 'undefined'),
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
async validateUrl(url) {
|
|
@@ -2,12 +2,13 @@ import * as fs from 'fs';
|
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import * as os from 'os';
|
|
4
4
|
import * as crypto from 'crypto';
|
|
5
|
+
import { VERSION } from '../../shared/constants/version.constants';
|
|
5
6
|
export class UsageTelemetry {
|
|
6
7
|
static getPayload() {
|
|
7
8
|
const cfg = UsageTelemetry.loadConfig();
|
|
8
9
|
return {
|
|
9
10
|
installId: cfg.installId,
|
|
10
|
-
rdapifyVersion:
|
|
11
|
+
rdapifyVersion: VERSION,
|
|
11
12
|
nodeVersion: process.version,
|
|
12
13
|
platform: process.platform,
|
|
13
14
|
queryTypesUsed: cfg.queryTypesUsed,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = '0.3.2';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VERSION } from '../constants/version.constants';
|
|
1
2
|
export const DEFAULT_OPTIONS = {
|
|
2
3
|
cache: {
|
|
3
4
|
strategy: 'memory',
|
|
@@ -41,7 +42,7 @@ export const DEFAULT_OPTIONS = {
|
|
|
41
42
|
debug: {
|
|
42
43
|
enabled: false,
|
|
43
44
|
},
|
|
44
|
-
userAgent:
|
|
45
|
+
userAgent: `RDAPify/${VERSION} (https://rdapify.com)`,
|
|
45
46
|
includeRaw: false,
|
|
46
47
|
followRedirects: true,
|
|
47
48
|
maxRedirects: 5,
|
|
@@ -63,4 +64,10 @@ export const DEFAULT_OPTIONS = {
|
|
|
63
64
|
usageTelemetry: {
|
|
64
65
|
enabled: false,
|
|
65
66
|
},
|
|
67
|
+
circuitBreaker: {
|
|
68
|
+
failureThreshold: 5,
|
|
69
|
+
successThreshold: 1,
|
|
70
|
+
halfOpenTimeout: 30000,
|
|
71
|
+
window: 60000,
|
|
72
|
+
},
|
|
66
73
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export function isPrivateIP(ip) {
|
|
2
2
|
const trimmed = ip.trim();
|
|
3
|
+
if (trimmed.toLowerCase().startsWith('::ffff:')) {
|
|
4
|
+
const ipv4Part = trimmed.slice(7);
|
|
5
|
+
if (ipv4Part.includes('.')) {
|
|
6
|
+
return isPrivateIP(ipv4Part);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
3
9
|
if (trimmed.includes('.')) {
|
|
4
10
|
const parts = trimmed.split('.').map((p) => parseInt(p, 10));
|
|
5
11
|
if (parts[0] === 10)
|
|
@@ -9,6 +15,14 @@ export function isPrivateIP(ip) {
|
|
|
9
15
|
return true;
|
|
10
16
|
if (parts[0] === 192 && parts[1] === 168)
|
|
11
17
|
return true;
|
|
18
|
+
const part1Cgn = parts[1];
|
|
19
|
+
if (parts[0] === 100 && part1Cgn !== undefined && part1Cgn >= 64 && part1Cgn <= 127)
|
|
20
|
+
return true;
|
|
21
|
+
const part1Bench = parts[1];
|
|
22
|
+
if (parts[0] === 198 && part1Bench !== undefined && part1Bench >= 18 && part1Bench <= 19)
|
|
23
|
+
return true;
|
|
24
|
+
if (parts[0] === 0)
|
|
25
|
+
return true;
|
|
12
26
|
return false;
|
|
13
27
|
}
|
|
14
28
|
if (trimmed.includes(':')) {
|
|
@@ -75,6 +75,9 @@ export declare class RDAPClient {
|
|
|
75
75
|
inflight: number;
|
|
76
76
|
windowMs: number;
|
|
77
77
|
};
|
|
78
|
+
getCircuitBreakerStats(): Record<string, {
|
|
79
|
+
state: string;
|
|
80
|
+
}>;
|
|
78
81
|
getLogger(): Logger;
|
|
79
82
|
getLogs(count?: number): import("../../infrastructure/logging/Logger").LogEntry[];
|
|
80
83
|
clearAll(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDAPClient.d.ts","sourceRoot":"","sources":["../../../../src/application/client/RDAPClient.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAKpE,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKvK,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;A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;YACb,OAAO,EAAE,OAAO,CAAC;YACjB,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,EAAE,CAAC;SACjB,CAAC;KACH,CAAC;IAUF,SAAS,IAAI,QAAQ,CAAC,iBAAiB,CAAC;IAOxC,cAAc,IAAI,WAAW;IAY7B,iBAAiB,IAAI,cAAc;IAwBnC,WAAW,CAAC,CAAC,SAAS,gBAAgB,EACpC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;IAOrD,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM;IAOzB,sBAAsB;;;;;;IActB,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAQ5C,oBAAoB,IAAI,iBAAiB;IAOzC,oBAAoB;;;;;IAYpB,sBAAsB,IAAI,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAU3D,SAAS,IAAI,MAAM;IAOnB,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM;IAOhB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAU/B,OAAO,IAAI,IAAI;CAIhB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { RDAPifyError, SSRFProtectionError, NetworkError, TimeoutError, RDAPServ
|
|
|
6
6
|
export { validateDomain, validateIP, validateIPv4, validateIPv6, validateASN, validateNameserver, validateEntityHandle, isPrivateIP, isLocalhost, isLinkLocal, normalizeDomain, normalizeIP, normalizeASN, normalizeNameserver, normalizeEntityHandle, } from './shared/utils/validators';
|
|
7
7
|
export type { ICachePort } from './core/ports';
|
|
8
8
|
export { UsageTelemetry } from './infrastructure/telemetry/UsageTelemetry';
|
|
9
|
-
export
|
|
9
|
+
export { VERSION } from './shared/constants/version.constants';
|
|
10
10
|
export { BatchProcessor } from './application/services/BatchProcessor';
|
|
11
11
|
export { RateLimiter } from './infrastructure/http/RateLimiter';
|
|
12
12
|
export { DistributedRateLimiter } from './infrastructure/http/DistributedRateLimiter';
|
|
@@ -37,6 +37,7 @@ export { isNode, isBrowser, isDeno, isBun, isCloudflareWorkers, getRuntimeName,
|
|
|
37
37
|
export { isNativeAvailable } from './infrastructure/native/NativeBackend';
|
|
38
38
|
export { CircuitBreaker, CircuitOpenError } from './infrastructure/http/CircuitBreaker';
|
|
39
39
|
export type { CircuitState, CircuitBreakerOptions } from './infrastructure/http/CircuitBreaker';
|
|
40
|
+
export type { CircuitBreakerStats } from './infrastructure/http/Fetcher';
|
|
40
41
|
export { QueryAbortedError } from './shared/errors';
|
|
41
42
|
export { BunFetcher } from './infrastructure/http/BunFetcher';
|
|
42
43
|
export type { BunFetcherOptions } from './infrastructure/http/BunFetcher';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMlD,YAAY,EAEV,cAAc,EACd,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,aAAa,EAGb,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,eAAe,EACf,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAEV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAEV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAoBhC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,EACd,uBAAuB,EAGvB,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAiBzB,OAAO,EACL,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAoBnC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS/C,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAS3E,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMlD,YAAY,EAEV,cAAc,EACd,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,aAAa,EAGb,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,eAAe,EACf,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAEV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAEV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EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,YAAY,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAKhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAK9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAKzF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAgBxD,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACrE,eAAe,eAAe,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RawRDAPResponse } from '../../shared/types';
|
|
2
2
|
import type { TimeoutOptions } from '../../shared/types/options';
|
|
3
|
+
import type { CircuitBreakerOptions, CircuitState } from './CircuitBreaker';
|
|
3
4
|
import { SSRFProtection } from '../security/SSRFProtection';
|
|
4
5
|
export interface FetcherOptions {
|
|
5
6
|
timeout?: TimeoutOptions;
|
|
@@ -11,6 +12,12 @@ export interface FetcherOptions {
|
|
|
11
12
|
logRedirect?: (fromUrl: string, toUrl: string) => void;
|
|
12
13
|
http2?: boolean;
|
|
13
14
|
signal?: AbortSignal;
|
|
15
|
+
circuitBreaker?: CircuitBreakerOptions | false;
|
|
16
|
+
}
|
|
17
|
+
export interface CircuitBreakerStats {
|
|
18
|
+
[origin: string]: {
|
|
19
|
+
state: CircuitState;
|
|
20
|
+
};
|
|
14
21
|
}
|
|
15
22
|
export declare class Fetcher {
|
|
16
23
|
private readonly timeout;
|
|
@@ -22,8 +29,12 @@ export declare class Fetcher {
|
|
|
22
29
|
private readonly logRedirect?;
|
|
23
30
|
readonly http2: boolean;
|
|
24
31
|
private readonly signal?;
|
|
32
|
+
private readonly circuits;
|
|
33
|
+
private readonly cbOptions;
|
|
25
34
|
constructor(options?: FetcherOptions);
|
|
35
|
+
private getCircuit;
|
|
26
36
|
fetch(url: string): Promise<RawRDAPResponse>;
|
|
37
|
+
getCircuitBreakerStats(): CircuitBreakerStats;
|
|
27
38
|
private makeRequest;
|
|
28
39
|
getConfig(): {
|
|
29
40
|
timeout: Required<TimeoutOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fetcher.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/http/Fetcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Fetcher.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/http/Fetcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAM5D,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvD,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,MAAM,CAAC,EAAE,WAAW,CAAC;IAOrB,cAAc,CAAC,EAAE,qBAAqB,GAAG,KAAK,CAAC;CAChD;AAGD,MAAM,WAAW,mBAAmB;IACl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
{"version":3,"file":"SSRFProtection.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/security/SSRFProtection.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMxE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkC;gBAE9C,OAAO,GAAE,qBAA0B;IAiBzC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YA6D/B,iBAAiB;YA8CjB,cAAc;YAmDd,oBAAoB;IAwBlC,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,cAAc;IAYtB,SAAS,IAAI,QAAQ,CAAC,qBAAqB,CAAC;IAO5C,SAAS,IAAI,OAAO;CAGrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsageTelemetry.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/telemetry/UsageTelemetry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UsageTelemetry.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/telemetry/UsageTelemetry.ts"],"names":[],"mappings":"AA2BA,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,WAAW,SAAyD;IACpF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAA2C;IACnF,OAAO,CAAC,MAAM,CAAC,MAAM,CAAgC;IAKrD,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;WAmB/B,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBtE,MAAM,CAAC,MAAM,IAAI,IAAI;IASrB,MAAM,CAAC,OAAO,IAAI,IAAI;IAStB,MAAM,CAAC,KAAK,IAAI,IAAI;IAKpB,OAAO,CAAC,MAAM,CAAC,UAAU;IAiBzB,OAAO,CAAC,MAAM,CAAC,UAAU;CAQ1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/constants/index.ts"],"names":[],"mappings":"AAKA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/constants/index.ts"],"names":[],"mappings":"AAKA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.constants.d.ts","sourceRoot":"","sources":["../../../../src/shared/constants/version.constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -103,6 +103,12 @@ export interface RDAPClientOptions {
|
|
|
103
103
|
enabled?: boolean;
|
|
104
104
|
endpoint?: string;
|
|
105
105
|
};
|
|
106
|
+
circuitBreaker?: {
|
|
107
|
+
failureThreshold?: number;
|
|
108
|
+
successThreshold?: number;
|
|
109
|
+
halfOpenTimeout?: number;
|
|
110
|
+
window?: number;
|
|
111
|
+
} | false;
|
|
106
112
|
}
|
|
107
113
|
export declare const DEFAULT_OPTIONS: Required<RDAPClientOptions>;
|
|
108
114
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/options.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/options.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACv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AO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGjC,YAAY,CAAC,EAAE,MAAM,CAAC;IAOtB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IAQnC,aAAa,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;IAoB9C,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;IAO3C,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAQ7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAQhB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAO7B,MAAM,CAAC,EAAE,WAAW,CAAC;IAOrB,cAAc,CAAC,EAAE;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAUF,cAAc,CAAC,EAAE;QAEf,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,KAAK,CAAC;CACX;AAKD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,iBAAiB,CAwEvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/validators/network.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/validators/network.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAsD/C;AAKD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAU/C;AAKD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAa/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rdapify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Unified, secure, high-performance RDAP client with built-in SSRF protection and privacy controls",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -71,7 +71,9 @@
|
|
|
71
71
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,json,md}\"",
|
|
72
72
|
"verify:api": "node scripts/verify-api.js",
|
|
73
73
|
"verify:api:update": "npm run build && node scripts/verify-api.js",
|
|
74
|
-
"verify": "
|
|
74
|
+
"verify:versions": "node scripts/verify-versions.js",
|
|
75
|
+
"verify": "npm run lint && npm run typecheck && npm test && npm run build && npm run verify:api && npm run verify:versions",
|
|
76
|
+
"version": "node scripts/update-templates.js && git add templates/ examples/",
|
|
75
77
|
"prepublishOnly": "npm run verify",
|
|
76
78
|
"prepack": "npm run build",
|
|
77
79
|
"prepare": "husky install",
|
|
@@ -108,7 +110,7 @@
|
|
|
108
110
|
"author": {
|
|
109
111
|
"name": "RDAPify Contributors"
|
|
110
112
|
},
|
|
111
|
-
"license": "
|
|
113
|
+
"license": "Apache-2.0",
|
|
112
114
|
"repository": {
|
|
113
115
|
"type": "git",
|
|
114
116
|
"url": "git+https://github.com/rdapify/RDAPify.git"
|