@nictool/dns-resource-record 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -43
- package/README.md +48 -48
- package/index.js +83 -29
- package/lib/tinydns.js +68 -61
- package/package.json +1 -2
- package/rr/a.js +32 -23
- package/rr/aaaa.js +49 -35
- package/rr/caa.js +56 -44
- package/rr/cert.js +21 -19
- package/rr/cname.js +22 -23
- package/rr/dname.js +23 -23
- package/rr/dnskey.js +45 -43
- package/rr/ds.js +40 -40
- package/rr/hinfo.js +29 -28
- package/rr/https.js +62 -0
- package/rr/ipseckey.js +69 -50
- package/rr/key.js +23 -23
- package/rr/loc.js +71 -58
- package/rr/mx.js +41 -27
- package/rr/naptr.js +52 -53
- package/rr/ns.js +26 -23
- package/rr/nsec.js +24 -20
- package/rr/nsec3.js +59 -46
- package/rr/nsec3param.js +24 -26
- package/rr/nxt.js +65 -0
- package/rr/openpgpkey.js +18 -15
- package/rr/ptr.js +20 -21
- package/rr/rrsig.js +28 -23
- package/rr/sig.js +25 -20
- package/rr/smimea.js +36 -31
- package/rr/soa.js +56 -42
- package/rr/spf.js +21 -18
- package/rr/srv.js +45 -45
- package/rr/sshfp.js +30 -31
- package/rr/svcb.js +64 -0
- package/rr/tlsa.js +50 -45
- package/rr/tsig.js +56 -0
- package/rr/txt.js +42 -35
- package/rr/uri.js +33 -33
- package/rr/wks.js +45 -0
- package/rr.js +133 -87
- package/.codeclimate.yml +0 -25
- package/DEVELOP.md +0 -23
- package/test/a.js +0 -76
- package/test/aaaa.js +0 -79
- package/test/base.js +0 -138
- package/test/caa.js +0 -104
- package/test/cert.js +0 -48
- package/test/cname.js +0 -41
- package/test/dname.js +0 -53
- package/test/dnskey.js +0 -44
- package/test/ds.js +0 -44
- package/test/fake.js +0 -26
- package/test/hinfo.js +0 -75
- package/test/ipseckey.js +0 -115
- package/test/key.js +0 -37
- package/test/loc.js +0 -71
- package/test/mx.js +0 -75
- package/test/naptr.js +0 -40
- package/test/ns.js +0 -53
- package/test/nsec.js +0 -38
- package/test/nsec3.js +0 -40
- package/test/nsec3param.js +0 -26
- package/test/openpgpkey.js +0 -35
- package/test/ptr.js +0 -54
- package/test/rr.js +0 -196
- package/test/smimea.js +0 -45
- package/test/soa.js +0 -77
- package/test/spf.js +0 -48
- package/test/srv.js +0 -81
- package/test/sshfp.js +0 -62
- package/test/tinydns.js +0 -140
- package/test/tlsa.js +0 -54
- package/test/txt.js +0 -70
- package/test/uri.js +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -2,45 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
#### Unreleased
|
|
7
6
|
|
|
7
|
+
### [1.2.1] - 2024-03-10
|
|
8
|
+
|
|
9
|
+
- fix(nsec3param): fixed setHash fname typo
|
|
10
|
+
- feat(SVCB,HTTPS): add record support (#29)
|
|
11
|
+
- feat(OPENGPGPKEY): improved bindline parser, added test
|
|
12
|
+
- feat(throwHelp): far more useful error messages (#41)
|
|
13
|
+
- feat(A,MX,AAAA,CAA,IPSECKEY): added getCanonical
|
|
14
|
+
|
|
15
|
+
### [1.2.0] - 2024-03-07
|
|
16
|
+
|
|
17
|
+
- feat(index): export typeMap (lookup table for type to id)
|
|
18
|
+
- feat(NXT): added bind support
|
|
19
|
+
- feat(TSIG, WKS): added stub class
|
|
20
|
+
- doc(README): move synopsis section into table (#38)
|
|
21
|
+
- chore(style): set up prettier
|
|
8
22
|
|
|
9
23
|
### [1.1.6] - 2022-06-21
|
|
10
24
|
|
|
11
25
|
- doc(sshfp): added RFC 7479, 8709
|
|
12
26
|
|
|
13
|
-
|
|
14
27
|
### [1.1.5] - 2022-06-03
|
|
15
28
|
|
|
16
29
|
- ci: auto-populate node LTS versions to run CI tests with
|
|
17
30
|
|
|
18
|
-
|
|
19
31
|
### [1.1.4] - 2022-05-29
|
|
20
32
|
|
|
21
33
|
- doc(README): improved develop notes
|
|
22
34
|
- doc(CHANGELOG): make version numbers links
|
|
23
35
|
|
|
24
|
-
|
|
25
36
|
### [1.1.3] - 2022-05-29
|
|
26
37
|
|
|
27
38
|
- chore: publish npm package in @nictool namespace
|
|
28
39
|
|
|
29
|
-
|
|
30
40
|
### [1.1.2] - 2022-05-28
|
|
31
41
|
|
|
32
42
|
- chore(ci): replace .release with submodule
|
|
33
43
|
- chore(ci): use GHA with shared workflows
|
|
34
44
|
|
|
35
|
-
|
|
36
45
|
### [1.1.1] - 2022-04-28
|
|
37
46
|
|
|
38
47
|
- feat(DNSKEY): expanded algo from 1-5 to 1-16 (RFC 8624)
|
|
39
|
-
|
|
48
|
+
- warn if outside that range, not error
|
|
40
49
|
- feat(HINFO): added to/from tinydns
|
|
41
50
|
- test(dnskey): update fail test
|
|
42
51
|
|
|
43
|
-
|
|
44
52
|
### [1.1.0] - 2022-04-22
|
|
45
53
|
|
|
46
54
|
- feat(tinydns): add ipv4toOctal, octalToIPv4, base64toOctal, octalToBase64
|
|
@@ -54,7 +62,6 @@ Notable changes to this project are documented in this file.
|
|
|
54
62
|
- test(IPSECKEY): expand test coverage
|
|
55
63
|
- tinydns.unpackdomain: return fqdn + length, for RRs where the FQDN is part of the byte stream
|
|
56
64
|
|
|
57
|
-
|
|
58
65
|
### [1.0.1] - 2022-04-19
|
|
59
66
|
|
|
60
67
|
- feat(IPSECKEY): added basic support
|
|
@@ -65,7 +72,6 @@ Notable changes to this project are documented in this file.
|
|
|
65
72
|
- test(CERT): added two test cases
|
|
66
73
|
- test(KEY): added valid test
|
|
67
74
|
|
|
68
|
-
|
|
69
75
|
### [1.0.0] - 2022-04-18
|
|
70
76
|
|
|
71
77
|
- style: move rr/index to ./rr
|
|
@@ -73,7 +79,6 @@ Notable changes to this project are documented in this file.
|
|
|
73
79
|
- style(esm): convert from CJS to ESM (ES6 module)
|
|
74
80
|
- test: add base.getRdataFields
|
|
75
81
|
|
|
76
|
-
|
|
77
82
|
### [0.9.9] - 2022-04-14
|
|
78
83
|
|
|
79
84
|
- feat: parser improvements (DNSKEY, HINFO, NAPTR, SOA, TLSA, TXT)
|
|
@@ -83,7 +88,6 @@ Notable changes to this project are documented in this file.
|
|
|
83
88
|
- test/rr: update tests with expected error messages
|
|
84
89
|
- README: move some content to web links
|
|
85
90
|
|
|
86
|
-
|
|
87
91
|
### [0.9.8] - 2022-04-07
|
|
88
92
|
|
|
89
93
|
- url updates
|
|
@@ -91,19 +95,17 @@ Notable changes to this project are documented in this file.
|
|
|
91
95
|
- feat: add index.citeRFC
|
|
92
96
|
- docs: updates
|
|
93
97
|
|
|
94
|
-
|
|
95
98
|
### [0.9.7] - 2022-03-29
|
|
96
99
|
|
|
97
100
|
- index
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
- previousName -> previousOwner
|
|
102
|
+
- export a TYPE_MAP (id => name)
|
|
100
103
|
- isValidHostname: allow \ char
|
|
101
104
|
- add the word 'RFC' in error messages citing RFCs
|
|
102
105
|
- when rejecting hostname, show the rejected character
|
|
103
106
|
- maradns: add export support
|
|
104
107
|
- add index.citeRFC
|
|
105
108
|
|
|
106
|
-
|
|
107
109
|
### [0.9.6] - 2022-03-27
|
|
108
110
|
|
|
109
111
|
- rr\*: rename name -> owner (not overloaded)
|
|
@@ -113,7 +115,6 @@ Notable changes to this project are documented in this file.
|
|
|
113
115
|
- add macos testing
|
|
114
116
|
- add CERT, KEY, NSEC, NSEC3, NSEC3PARAM, OPENPGPKEY, SIG
|
|
115
117
|
|
|
116
|
-
|
|
117
118
|
### [0.9.5] - 2022-03-26
|
|
118
119
|
|
|
119
120
|
- README: add docs for getRFCs()
|
|
@@ -123,7 +124,6 @@ Notable changes to this project are documented in this file.
|
|
|
123
124
|
- master: NODE_ENV=cov when running coverage
|
|
124
125
|
- TXT: pass along zone_opts
|
|
125
126
|
|
|
126
|
-
|
|
127
127
|
### [0.9.4] - 2022-03-24
|
|
128
128
|
|
|
129
129
|
- add: getComment
|
|
@@ -131,15 +131,14 @@ Notable changes to this project are documented in this file.
|
|
|
131
131
|
- normalize hostnames to lower case
|
|
132
132
|
- add tests: fullyQualify, getFQDN
|
|
133
133
|
- AAAA
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
- compress: rewrote per RFC 5952, added tests
|
|
135
|
+
- internally store address in expanded notation
|
|
136
136
|
- fromTinydns: apply correct semantics for 'x' handling
|
|
137
137
|
- fullyQualify
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
- special handling for @
|
|
139
|
+
- consider $ORIGIN
|
|
140
140
|
- add uc hex chars to ip6 compress
|
|
141
141
|
|
|
142
|
-
|
|
143
142
|
### [0.9.3] - 2022-03-22
|
|
144
143
|
|
|
145
144
|
- hasValidLabels: remove trailing dot, else split returns empty string
|
|
@@ -155,7 +154,6 @@ Notable changes to this project are documented in this file.
|
|
|
155
154
|
- TXT: import BIND format w/o mangling WS
|
|
156
155
|
- SPF inherits from TXT
|
|
157
156
|
|
|
158
|
-
|
|
159
157
|
### [0.9.2] - 2022-03-18
|
|
160
158
|
|
|
161
159
|
- mx: weight -> preference
|
|
@@ -168,12 +166,10 @@ Notable changes to this project are documented in this file.
|
|
|
168
166
|
- validHostname: allow / char
|
|
169
167
|
- use \_\_dirname to find RR mods
|
|
170
168
|
|
|
171
|
-
|
|
172
169
|
### [0.9.1] - 2022-03-14
|
|
173
170
|
|
|
174
171
|
- TLSA, SMIMEA: add BIND support #13
|
|
175
172
|
|
|
176
|
-
|
|
177
173
|
### [0.9.0] - 2022-03-10
|
|
178
174
|
|
|
179
175
|
- added null object instantiation
|
|
@@ -187,19 +183,16 @@ Notable changes to this project are documented in this file.
|
|
|
187
183
|
- tests: more signal, less noise
|
|
188
184
|
- tests: import tests from nictool 2
|
|
189
185
|
|
|
190
|
-
|
|
191
186
|
### [0.8.1] - 2022-03-08
|
|
192
187
|
|
|
193
188
|
- use RFC example IPs and zone names
|
|
194
189
|
|
|
195
|
-
|
|
196
190
|
### [0.8.0] - 2022-02-01
|
|
197
191
|
|
|
198
192
|
- fromBind for: A, AAAA, CNAME, TXT, CNAME, TXT, LOC, MX, NS, SOA, PTR, SPF, SSHFP, URI, CAA, DNAME, NAPTR
|
|
199
193
|
- add fromTinydns: LOC
|
|
200
194
|
- rr/\*: add getFields
|
|
201
195
|
|
|
202
|
-
|
|
203
196
|
### [0.7.0] - 2021-10-26
|
|
204
197
|
|
|
205
198
|
- tinydns: added octalToHex, octalToUInt16, unpackDomainName, octalToInt8
|
|
@@ -207,38 +200,32 @@ Notable changes to this project are documented in this file.
|
|
|
207
200
|
- CAA, CNAME, DNAME, SPF, SSHFP, SRV, URI: added fromTinydns
|
|
208
201
|
- add tests for getRFCs
|
|
209
202
|
|
|
210
|
-
|
|
211
203
|
### [0.6.0] - 2021-10-25
|
|
212
204
|
|
|
213
205
|
- tinydns: added octalToChar
|
|
214
206
|
- A, MX, NS, PTR, SOA, TXT: added fromTinydns
|
|
215
207
|
|
|
216
|
-
|
|
217
208
|
### [0.5.1] - 2021-10-25
|
|
218
209
|
|
|
219
210
|
- LOC: added toTinydns
|
|
220
211
|
- tinydns: add UInt32toOctal
|
|
221
212
|
- SRV: added support
|
|
222
213
|
|
|
223
|
-
|
|
224
214
|
### [0.5.0] - 2021-10-24
|
|
225
215
|
|
|
226
216
|
- NAPTR: add toTinydns
|
|
227
217
|
- tinydns: remove sprintf-js dependency
|
|
228
218
|
|
|
229
|
-
|
|
230
219
|
### [0.4.0] - 2021-10-22
|
|
231
220
|
|
|
232
221
|
- CAA, DNAME, SSHFP, URI: add toTinydns
|
|
233
222
|
- lib/tinydns: added packHex and UInt16AsOctal
|
|
234
223
|
|
|
235
|
-
|
|
236
224
|
### [0.3.1] - 2021-10-21
|
|
237
225
|
|
|
238
226
|
- update index.js to also export RR sub classes
|
|
239
227
|
- update README examples
|
|
240
228
|
|
|
241
|
-
|
|
242
229
|
### [0.3.0] - 2021-10-21
|
|
243
230
|
|
|
244
231
|
- add getRFCs to all RR types
|
|
@@ -246,7 +233,6 @@ Notable changes to this project are documented in this file.
|
|
|
246
233
|
- toBind: use tabs for exported WS
|
|
247
234
|
- CAA, DNAME, NAPTR, SSHFP, URI: add toBind, tests
|
|
248
235
|
|
|
249
|
-
|
|
250
236
|
### [0.2.3] - 2021-10-21
|
|
251
237
|
|
|
252
238
|
- refactored classes into separate files
|
|
@@ -255,30 +241,25 @@ Notable changes to this project are documented in this file.
|
|
|
255
241
|
- lib/tinydns: added escapeOct & packDomainName
|
|
256
242
|
- PTR, SRV: added tests
|
|
257
243
|
|
|
258
|
-
|
|
259
244
|
### [0.2.2] - 2021-10-20
|
|
260
245
|
|
|
261
|
-
- add tests
|
|
246
|
+
- add tests/\*
|
|
262
247
|
- A, AAAA, add toBind and toTinydns()
|
|
263
248
|
- add .release
|
|
264
249
|
|
|
265
|
-
|
|
266
250
|
### [0.2.1] - 2021-10-16
|
|
267
251
|
|
|
268
252
|
- additional RR formats started, weakly validated
|
|
269
253
|
|
|
270
|
-
|
|
271
254
|
### [0.2.0] - 2021-10-16
|
|
272
255
|
|
|
273
256
|
- initial release & name grab
|
|
274
257
|
|
|
275
|
-
|
|
276
258
|
# References
|
|
277
259
|
|
|
278
260
|
- [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
279
261
|
- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
280
|
-
|
|
281
|
-
|
|
262
|
+
- fix, feature, BREAKING CHANGE, build, chore, ci, docs, style, test
|
|
282
263
|
|
|
283
264
|
[1.1.3]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.3
|
|
284
265
|
[1.1.2]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.2
|
|
@@ -312,3 +293,5 @@ Notable changes to this project are documented in this file.
|
|
|
312
293
|
[1.1.4]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.4
|
|
313
294
|
[1.1.5]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.5
|
|
314
295
|
[1.1.6]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.6
|
|
296
|
+
[1.1.8]: https://github.com/NicTool/dns-resource-record/releases/tag/1.1.8
|
|
297
|
+
[1.2.1]: https://github.com/NicTool/dns-resource-record/releases/tag/1.2.1
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ DNS resource record parser, validator, importer, and exporter.
|
|
|
10
10
|
This module is used to:
|
|
11
11
|
|
|
12
12
|
- validate well formedness and RFC compliance of DNS resource records
|
|
13
|
-
- import RRs
|
|
13
|
+
- import RRs to and from the following formats:
|
|
14
14
|
|
|
15
15
|
| **RR format** | **import** | **export** |
|
|
16
16
|
| :------------------------------------------------------: | :----------------: | :----------------: |
|
|
@@ -29,7 +29,7 @@ This package is for working with _individual_ Resource Records. For working with
|
|
|
29
29
|
Load the index for access to all RR types:
|
|
30
30
|
|
|
31
31
|
```js
|
|
32
|
-
import * as RR from 'dns-resource-record'
|
|
32
|
+
import * as RR from '@nictool/dns-resource-record'
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### EXAMPLES
|
|
@@ -179,66 +179,67 @@ A(5) [Map] {
|
|
|
179
179
|
|
|
180
180
|
Consider this a "running with scissors" mode.
|
|
181
181
|
|
|
182
|
-
|
|
183
182
|
## Supported Records
|
|
184
183
|
|
|
185
184
|
This module intends to include support for all current (ie, not officially deprecated) DNS RRs **and** all RRs that are in active use on the internet.
|
|
186
185
|
|
|
187
186
|
PRs are welcome, especially PRs with tests.
|
|
188
187
|
|
|
189
|
-
|
|
|
190
|
-
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
|
|
|
209
|
-
| **
|
|
210
|
-
|
|
|
211
|
-
| **
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
|
|
188
|
+
| **RR** | **toBind** | **toTinydns** | **fromBind** | **fromTinydns** |
|
|
189
|
+
| :------------: | :----------------: | :----------------: | :----------------: | :----------------: |
|
|
190
|
+
| **A** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
191
|
+
| **AAAA** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
192
|
+
| **CAA** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
193
|
+
| **CERT** | :white_check_mark: | | :white_check_mark: | |
|
|
194
|
+
| **CNAME** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
195
|
+
| **DNAME** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
196
|
+
| **DNSKEY** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
197
|
+
| **DS** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
198
|
+
| **HINFO** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
199
|
+
| **HTTPS** | | | | |
|
|
200
|
+
| **IPSECKEY** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
201
|
+
| **KEY** | | | | |
|
|
202
|
+
| **LOC** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
203
|
+
| **MX** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
204
|
+
| **NAPTR** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
205
|
+
| **NS** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
206
|
+
| **NSEC** | :white_check_mark: | | :white_check_mark: | |
|
|
207
|
+
| **NSEC3** | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
|
|
208
|
+
| **NSEC3PARAM** | | | | |
|
|
209
|
+
| **NXT** | | | | |
|
|
210
|
+
| **OPENPGPKEY** | | | | |
|
|
211
|
+
| **PTR** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
212
|
+
| **RRSIG** | | | | |
|
|
213
|
+
| **SIG** | | | | |
|
|
214
|
+
| **SMIMEA** | :white_check_mark: | | :white_check_mark: | |
|
|
215
|
+
| **SOA** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
216
|
+
| **SPF** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
217
|
+
| **SRV** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
218
|
+
| **SSHFP** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
219
|
+
| **SVCB** | | | | |
|
|
220
|
+
| **TLSA** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
221
|
+
| **TSIG** | | | | |
|
|
222
|
+
| **TXT** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
223
|
+
| **URI** | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
224
|
+
| **WKS** | | | | |
|
|
222
225
|
|
|
223
226
|
## TIPS
|
|
224
227
|
|
|
225
228
|
- Domain owner names are:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
- stored fully qualified, aka absolute.
|
|
230
|
+
- normalized to lower case, because:
|
|
231
|
+
- DNS is case insensitive (see RFCs 4343, 1035, 1034)
|
|
232
|
+
- this library enforces duplicate suppression
|
|
233
|
+
- DNSSEC canonicalization (see RFC 4034)
|
|
234
|
+
- wire format for most RRs require it
|
|
235
|
+
- Master Zone File expansions exist in [dns-zone](https://github.com/NicTool/dns-zone)
|
|
233
236
|
- to{Bind|MaraDNS} output can be influenced (suppress TTL, class, relative domain names) with an options object. See it in `bin/dns-zone` in the [dns-zone](https://github.com/NicTool/dns-zone) package.
|
|
234
237
|
|
|
235
|
-
|
|
236
238
|
## SEE ALSO
|
|
237
239
|
|
|
238
240
|
- [Dictionary of DNS terms](https://nictool.github.io/web/Dictionary)
|
|
239
241
|
- [Wikipedia, List of DNS Record Types](https://en.wikipedia.org/wiki/List_of_DNS_record_types)
|
|
240
242
|
|
|
241
|
-
|
|
242
243
|
## TODO
|
|
243
244
|
|
|
244
245
|
- [x] Change all IPs to use [RFC example/doc](https://en.wikipedia.org/wiki/Reserved_IP_addresses) address space
|
|
@@ -249,15 +250,14 @@ PRs are welcome, especially PRs with tests.
|
|
|
249
250
|
- [x] CERT RRs: CERT, KEY, SIG, OPENPGPKEY
|
|
250
251
|
- [x] RFC 4034: if the type of RR is NS, MD, MF, CNAME, SOA, MB,
|
|
251
252
|
MG, MR, PTR, HINFO, MINFO, MX, RP, AFSDB, RT, SIG, PX, NXT,
|
|
252
|
-
NAPTR, KX, SRV, DNAME, A6, RRSIG, or NSEC, all uppercase
|
|
253
|
+
NAPTR, KX, SRV, DNAME, A6, RRSIG, or NSEC, all uppercase
|
|
253
254
|
letters in the DNS names contained within the RDATA are replaced by the lowercase letters;
|
|
254
255
|
- [x] LOC record ingest/out isn't consistent with API
|
|
255
256
|
- [ ] export a web page for each RR type
|
|
256
257
|
|
|
257
|
-
|
|
258
258
|
## DEVELOP
|
|
259
259
|
|
|
260
260
|
- There are no dependencies. That's no accident.
|
|
261
261
|
- ES modules for use by node.js and browser
|
|
262
262
|
- Platform independence is a goal
|
|
263
|
-
|
|
263
|
+
- [x] CI tests are on linux, windows, and macos
|
package/index.js
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
|
+
const typeMap = {}
|
|
1
2
|
|
|
2
|
-
import RR
|
|
3
|
-
import A
|
|
4
|
-
import AAAA
|
|
5
|
-
import CAA
|
|
6
|
-
import CERT
|
|
7
|
-
import CNAME
|
|
8
|
-
import DNAME
|
|
9
|
-
import DNSKEY
|
|
10
|
-
import DS
|
|
11
|
-
import HINFO
|
|
3
|
+
import RR from './rr.js'
|
|
4
|
+
import A from './rr/a.js'
|
|
5
|
+
import AAAA from './rr/aaaa.js'
|
|
6
|
+
import CAA from './rr/caa.js'
|
|
7
|
+
import CERT from './rr/cert.js'
|
|
8
|
+
import CNAME from './rr/cname.js'
|
|
9
|
+
import DNAME from './rr/dname.js'
|
|
10
|
+
import DNSKEY from './rr/dnskey.js'
|
|
11
|
+
import DS from './rr/ds.js'
|
|
12
|
+
import HINFO from './rr/hinfo.js'
|
|
13
|
+
import HTTPS from './rr/https.js'
|
|
12
14
|
import IPSECKEY from './rr/ipseckey.js'
|
|
13
|
-
import KEY
|
|
14
|
-
import LOC
|
|
15
|
-
import MX
|
|
16
|
-
import NAPTR
|
|
17
|
-
import NS
|
|
18
|
-
import NSEC
|
|
19
|
-
import NSEC3
|
|
15
|
+
import KEY from './rr/key.js'
|
|
16
|
+
import LOC from './rr/loc.js'
|
|
17
|
+
import MX from './rr/mx.js'
|
|
18
|
+
import NAPTR from './rr/naptr.js'
|
|
19
|
+
import NS from './rr/ns.js'
|
|
20
|
+
import NSEC from './rr/nsec.js'
|
|
21
|
+
import NSEC3 from './rr/nsec3.js'
|
|
20
22
|
import NSEC3PARAM from './rr/nsec3param.js'
|
|
23
|
+
import NXT from './rr/nxt.js'
|
|
21
24
|
import OPENPGPKEY from './rr/openpgpkey.js'
|
|
22
|
-
import PTR
|
|
23
|
-
import RRSIG
|
|
24
|
-
import SIG
|
|
25
|
-
import SMIMEA
|
|
26
|
-
import SOA
|
|
27
|
-
import SPF
|
|
28
|
-
import SRV
|
|
29
|
-
import SSHFP
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
25
|
+
import PTR from './rr/ptr.js'
|
|
26
|
+
import RRSIG from './rr/rrsig.js'
|
|
27
|
+
import SIG from './rr/sig.js'
|
|
28
|
+
import SMIMEA from './rr/smimea.js'
|
|
29
|
+
import SOA from './rr/soa.js'
|
|
30
|
+
import SPF from './rr/spf.js'
|
|
31
|
+
import SRV from './rr/srv.js'
|
|
32
|
+
import SSHFP from './rr/sshfp.js'
|
|
33
|
+
import SVCB from './rr/svcb.js'
|
|
34
|
+
import TLSA from './rr/tlsa.js'
|
|
35
|
+
import TSIG from './rr/tsig.js'
|
|
36
|
+
import TXT from './rr/txt.js'
|
|
37
|
+
import URI from './rr/uri.js'
|
|
38
|
+
import WKS from './rr/wks.js'
|
|
33
39
|
|
|
34
40
|
export default RR
|
|
35
41
|
|
|
@@ -43,6 +49,7 @@ export {
|
|
|
43
49
|
DNSKEY,
|
|
44
50
|
DS,
|
|
45
51
|
HINFO,
|
|
52
|
+
HTTPS,
|
|
46
53
|
IPSECKEY,
|
|
47
54
|
KEY,
|
|
48
55
|
LOC,
|
|
@@ -52,6 +59,7 @@ export {
|
|
|
52
59
|
NSEC,
|
|
53
60
|
NSEC3,
|
|
54
61
|
NSEC3PARAM,
|
|
62
|
+
NXT,
|
|
55
63
|
OPENPGPKEY,
|
|
56
64
|
PTR,
|
|
57
65
|
RRSIG,
|
|
@@ -61,7 +69,53 @@ export {
|
|
|
61
69
|
SOA,
|
|
62
70
|
SPF,
|
|
63
71
|
SRV,
|
|
72
|
+
SVCB,
|
|
64
73
|
TLSA,
|
|
74
|
+
TSIG,
|
|
65
75
|
TXT,
|
|
66
|
-
URI
|
|
76
|
+
URI,
|
|
77
|
+
WKS,
|
|
78
|
+
typeMap,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
for (const c of [
|
|
82
|
+
A,
|
|
83
|
+
AAAA,
|
|
84
|
+
CAA,
|
|
85
|
+
CERT,
|
|
86
|
+
CNAME,
|
|
87
|
+
DNAME,
|
|
88
|
+
DNSKEY,
|
|
89
|
+
DS,
|
|
90
|
+
HINFO,
|
|
91
|
+
HTTPS,
|
|
92
|
+
IPSECKEY,
|
|
93
|
+
KEY,
|
|
94
|
+
LOC,
|
|
95
|
+
MX,
|
|
96
|
+
NAPTR,
|
|
97
|
+
NS,
|
|
98
|
+
NSEC,
|
|
99
|
+
NSEC3,
|
|
100
|
+
NSEC3PARAM,
|
|
101
|
+
NXT,
|
|
102
|
+
OPENPGPKEY,
|
|
103
|
+
PTR,
|
|
104
|
+
RRSIG,
|
|
105
|
+
SIG,
|
|
106
|
+
SMIMEA,
|
|
107
|
+
SSHFP,
|
|
108
|
+
SOA,
|
|
109
|
+
SPF,
|
|
110
|
+
SRV,
|
|
111
|
+
SVCB,
|
|
112
|
+
TLSA,
|
|
113
|
+
TSIG,
|
|
114
|
+
TXT,
|
|
115
|
+
URI,
|
|
116
|
+
WKS,
|
|
117
|
+
]) {
|
|
118
|
+
const id = new c(null).getTypeId()
|
|
119
|
+
typeMap[id] = c.name
|
|
120
|
+
typeMap[c.name] = id
|
|
67
121
|
}
|