@nictool/dns-resource-record 1.2.2 → 1.2.4
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 +21 -2
- package/README.md +2 -13
- package/package.json +15 -9
- package/rr/a.js +1 -3
- package/rr/aaaa.js +6 -7
- package/rr/caa.js +13 -2
- package/rr/cname.js +1 -3
- package/rr/dname.js +1 -3
- package/rr/dnskey.js +38 -5
- package/rr/ds.js +13 -2
- package/rr/ipseckey.js +26 -10
- package/rr/key.js +14 -2
- package/rr/mx.js +1 -3
- package/rr/naptr.js +5 -1
- package/rr/rrsig.js +13 -2
- package/rr/smimea.js +29 -3
- package/rr/srv.js +1 -3
- package/rr/sshfp.js +20 -3
- package/rr/tlsa.js +29 -3
- package/rr.js +15 -6
- package/.codeclimate.yml +0 -25
- package/.github/FUNDING.yml +0 -3
- package/.github/workflows/ci.yml +0 -43
- package/.github/workflows/codeql.yml +0 -14
- package/.github/workflows/publish.yml +0 -16
- package/.gitmodules +0 -3
- package/.prettierrc.yml +0 -3
- package/DEVELOP.md +0 -9
- package/eslint.config.mjs +0 -41
- package/test/a.js +0 -75
- package/test/aaaa.js +0 -86
- package/test/base.js +0 -148
- package/test/caa.js +0 -111
- package/test/cert.js +0 -48
- package/test/cname.js +0 -40
- package/test/dname.js +0 -57
- package/test/dnskey.js +0 -45
- package/test/ds.js +0 -45
- package/test/fake.js +0 -34
- package/test/hinfo.js +0 -80
- package/test/https.js +0 -56
- package/test/ipseckey.js +0 -141
- package/test/key.js +0 -36
- package/test/loc.js +0 -75
- package/test/mx.js +0 -78
- package/test/naptr.js +0 -47
- package/test/ns.js +0 -56
- package/test/nsec.js +0 -37
- package/test/nsec3.js +0 -47
- package/test/nsec3param.js +0 -23
- package/test/nxt.js +0 -37
- package/test/openpgpkey.js +0 -85
- package/test/ptr.js +0 -56
- package/test/rr.js +0 -212
- package/test/smimea.js +0 -51
- package/test/soa.js +0 -99
- package/test/spf.js +0 -51
- package/test/srv.js +0 -101
- package/test/sshfp.js +0 -69
- package/test/svcb.js +0 -56
- package/test/tinydns.js +0 -163
- package/test/tlsa.js +0 -63
- package/test/txt.js +0 -82
- package/test/uri.js +0 -65
package/test/uri.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import assert from 'assert'
|
|
2
|
-
|
|
3
|
-
import * as base from './base.js'
|
|
4
|
-
|
|
5
|
-
import URI from '../rr/uri.js'
|
|
6
|
-
|
|
7
|
-
const validRecords = [
|
|
8
|
-
{
|
|
9
|
-
class: 'IN',
|
|
10
|
-
owner: 'www.example.com.',
|
|
11
|
-
type: 'URI',
|
|
12
|
-
target: 'www2.example.com.',
|
|
13
|
-
priority: 1,
|
|
14
|
-
weight: 0,
|
|
15
|
-
ttl: 3600,
|
|
16
|
-
testB: 'www.example.com.\t3600\tIN\tURI\t1\t0\t"www2.example.com."\n',
|
|
17
|
-
testT:
|
|
18
|
-
':www.example.com:256:\\000\\001\\000\\000www2.example.com.:3600::\n',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
class: 'IN',
|
|
22
|
-
owner: '_http.github.dog.',
|
|
23
|
-
type: 'URI',
|
|
24
|
-
target: 'http://github.com/dog',
|
|
25
|
-
priority: 2,
|
|
26
|
-
weight: 100,
|
|
27
|
-
ttl: 3600,
|
|
28
|
-
testB:
|
|
29
|
-
'_http.github.dog.\t3600\tIN\tURI\t2\t100\t"http://github.com/dog"\n',
|
|
30
|
-
testT:
|
|
31
|
-
':_http.github.dog:256:\\000\\002\\000\\144http\\072\\057\\057github.com\\057dog:3600::\n',
|
|
32
|
-
},
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
const invalidRecords = []
|
|
36
|
-
|
|
37
|
-
describe('URI record', function () {
|
|
38
|
-
base.valid(URI, validRecords)
|
|
39
|
-
base.invalid(URI, invalidRecords)
|
|
40
|
-
|
|
41
|
-
base.getDescription(URI)
|
|
42
|
-
base.getRFCs(URI, validRecords[0])
|
|
43
|
-
base.getFields(URI, ['priority', 'weight', 'target'])
|
|
44
|
-
base.getTypeId(URI, 256)
|
|
45
|
-
|
|
46
|
-
base.toBind(URI, validRecords)
|
|
47
|
-
base.toTinydns(URI, validRecords)
|
|
48
|
-
|
|
49
|
-
base.fromBind(URI, validRecords)
|
|
50
|
-
base.fromTinydns(URI, validRecords)
|
|
51
|
-
|
|
52
|
-
for (const val of validRecords) {
|
|
53
|
-
it.skip(`imports tinydns (generic) record`, async function () {
|
|
54
|
-
const r = new URI({ tinyline: val.testT })
|
|
55
|
-
if (process.env.DEBUG) console.dir(r)
|
|
56
|
-
for (const f of ['owner', 'priority', 'weight', 'target', 'ttl']) {
|
|
57
|
-
assert.deepStrictEqual(
|
|
58
|
-
r.get(f),
|
|
59
|
-
val[f],
|
|
60
|
-
`${f}: ${r.get(f)} !== ${val[f]}`,
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
})
|