@helia/interop 5.1.0 → 6.0.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipns-dnslink.spec.d.ts","sourceRoot":"","sources":["../../src/ipns-dnslink.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-env mocha */
|
|
2
|
+
import { ipns } from '@helia/ipns';
|
|
3
|
+
import { expect } from 'aegir/chai';
|
|
4
|
+
import { createHeliaNode } from './fixtures/create-helia.js';
|
|
5
|
+
const TEST_DOMAINS = [
|
|
6
|
+
'ipfs.io',
|
|
7
|
+
'docs.ipfs.tech',
|
|
8
|
+
'en.wikipedia-on-ipfs.org',
|
|
9
|
+
'blog.libp2p.io',
|
|
10
|
+
'consensuslab.world',
|
|
11
|
+
'n0.computer',
|
|
12
|
+
'protocol.ai',
|
|
13
|
+
'research.protocol.ai',
|
|
14
|
+
'probelab.io',
|
|
15
|
+
'singularity.storage',
|
|
16
|
+
'saturn.tech'
|
|
17
|
+
];
|
|
18
|
+
describe('@helia/ipns - dnslink', () => {
|
|
19
|
+
let helia;
|
|
20
|
+
let name;
|
|
21
|
+
beforeEach(async () => {
|
|
22
|
+
helia = await createHeliaNode();
|
|
23
|
+
name = ipns(helia);
|
|
24
|
+
});
|
|
25
|
+
afterEach(async () => {
|
|
26
|
+
if (helia != null) {
|
|
27
|
+
await helia.stop();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
TEST_DOMAINS.forEach(domain => {
|
|
31
|
+
it(`should resolve ${domain}`, async () => {
|
|
32
|
+
const result = await name.resolveDNSLink(domain);
|
|
33
|
+
expect(result).to.have.property('cid');
|
|
34
|
+
}).retries(5);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=ipns-dnslink.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/interop",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Interop tests for Helia",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/interop#readme",
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@chainsafe/libp2p-gossipsub": "^13.0.0",
|
|
61
|
-
"@helia/block-brokers": "^2.0.
|
|
62
|
-
"@helia/car": "^3.1.
|
|
63
|
-
"@helia/dag-cbor": "^3.0.
|
|
64
|
-
"@helia/dag-json": "^3.0.
|
|
65
|
-
"@helia/http": "^1.0.
|
|
66
|
-
"@helia/interface": "^4.0
|
|
67
|
-
"@helia/ipns": "^
|
|
68
|
-
"@helia/json": "^3.0.
|
|
69
|
-
"@helia/mfs": "^3.0.
|
|
70
|
-
"@helia/routers": "^1.0.
|
|
71
|
-
"@helia/strings": "^3.0.
|
|
72
|
-
"@helia/unixfs": "^3.0.
|
|
61
|
+
"@helia/block-brokers": "^2.0.3",
|
|
62
|
+
"@helia/car": "^3.1.1",
|
|
63
|
+
"@helia/dag-cbor": "^3.0.2",
|
|
64
|
+
"@helia/dag-json": "^3.0.2",
|
|
65
|
+
"@helia/http": "^1.0.3",
|
|
66
|
+
"@helia/interface": "^4.1.0",
|
|
67
|
+
"@helia/ipns": "^7.0.0",
|
|
68
|
+
"@helia/json": "^3.0.2",
|
|
69
|
+
"@helia/mfs": "^3.0.2",
|
|
70
|
+
"@helia/routers": "^1.0.2",
|
|
71
|
+
"@helia/strings": "^3.0.2",
|
|
72
|
+
"@helia/unixfs": "^3.0.2",
|
|
73
73
|
"@ipld/car": "^5.3.0",
|
|
74
74
|
"@ipld/dag-cbor": "^9.2.0",
|
|
75
75
|
"@libp2p/interface": "^1.1.4",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@libp2p/websockets": "^8.0.16",
|
|
81
81
|
"@multiformats/sha3": "^3.0.2",
|
|
82
82
|
"aegir": "^42.2.5",
|
|
83
|
-
"helia": "^4.0
|
|
83
|
+
"helia": "^4.1.0",
|
|
84
84
|
"ipfs-core-types": "^0.14.1",
|
|
85
85
|
"ipfs-unixfs-importer": "^15.2.4",
|
|
86
86
|
"ipfsd-ctl": "^13.0.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"it-last": "^3.0.4",
|
|
90
90
|
"it-map": "^3.0.5",
|
|
91
91
|
"it-to-buffer": "^4.0.5",
|
|
92
|
-
"kubo": "^0.
|
|
92
|
+
"kubo": "^0.27.0",
|
|
93
93
|
"kubo-rpc-client": "^3.0.3",
|
|
94
94
|
"libp2p": "^1.2.4",
|
|
95
95
|
"multiformats": "^13.1.0",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* eslint-env mocha */
|
|
2
|
+
|
|
3
|
+
import { ipns } from '@helia/ipns'
|
|
4
|
+
import { expect } from 'aegir/chai'
|
|
5
|
+
import { createHeliaNode } from './fixtures/create-helia.js'
|
|
6
|
+
import type { IPNS } from '@helia/ipns'
|
|
7
|
+
import type { HeliaLibp2p } from 'helia'
|
|
8
|
+
|
|
9
|
+
const TEST_DOMAINS: string[] = [
|
|
10
|
+
'ipfs.io',
|
|
11
|
+
'docs.ipfs.tech',
|
|
12
|
+
'en.wikipedia-on-ipfs.org',
|
|
13
|
+
'blog.libp2p.io',
|
|
14
|
+
'consensuslab.world',
|
|
15
|
+
'n0.computer',
|
|
16
|
+
'protocol.ai',
|
|
17
|
+
'research.protocol.ai',
|
|
18
|
+
'probelab.io',
|
|
19
|
+
'singularity.storage',
|
|
20
|
+
'saturn.tech'
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
describe('@helia/ipns - dnslink', () => {
|
|
24
|
+
let helia: HeliaLibp2p
|
|
25
|
+
let name: IPNS
|
|
26
|
+
|
|
27
|
+
beforeEach(async () => {
|
|
28
|
+
helia = await createHeliaNode()
|
|
29
|
+
name = ipns(helia)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
afterEach(async () => {
|
|
33
|
+
if (helia != null) {
|
|
34
|
+
await helia.stop()
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
TEST_DOMAINS.forEach(domain => {
|
|
39
|
+
it(`should resolve ${domain}`, async () => {
|
|
40
|
+
const result = await name.resolveDNSLink(domain)
|
|
41
|
+
|
|
42
|
+
expect(result).to.have.property('cid')
|
|
43
|
+
}).retries(5)
|
|
44
|
+
})
|
|
45
|
+
})
|