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