@helia/interop 10.2.2 → 10.2.3
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/.aegir.js +49 -0
- package/package.json +3 -2
package/.aegir.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import getPort from 'aegir/get-port'
|
|
2
|
+
import { createServer } from 'ipfsd-ctl'
|
|
3
|
+
import { create } from 'kubo-rpc-client'
|
|
4
|
+
import { path } from 'kubo'
|
|
5
|
+
|
|
6
|
+
/** @type {import('aegir').PartialOptions} */
|
|
7
|
+
export default {
|
|
8
|
+
test: {
|
|
9
|
+
files: './dist/src/*.spec.js',
|
|
10
|
+
before: async (options) => {
|
|
11
|
+
if (options.runner !== 'node') {
|
|
12
|
+
const ipfsdPort = await getPort()
|
|
13
|
+
const ipfsdServer = await createServer({
|
|
14
|
+
host: '127.0.0.1',
|
|
15
|
+
port: ipfsdPort
|
|
16
|
+
}, {
|
|
17
|
+
type: 'kubo',
|
|
18
|
+
bin: path(),
|
|
19
|
+
rpc: create,
|
|
20
|
+
test: true,
|
|
21
|
+
init: {
|
|
22
|
+
config: {
|
|
23
|
+
Addresses: {
|
|
24
|
+
Swarm: [
|
|
25
|
+
"/ip4/0.0.0.0/tcp/0",
|
|
26
|
+
"/ip4/0.0.0.0/tcp/0/ws"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}).start()
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
env: {
|
|
35
|
+
IPFSD_SERVER: `http://127.0.0.1:${ipfsdPort}`
|
|
36
|
+
},
|
|
37
|
+
ipfsdServer
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return {}
|
|
42
|
+
},
|
|
43
|
+
after: async (options, beforeResult) => {
|
|
44
|
+
if (options.runner !== 'node') {
|
|
45
|
+
await beforeResult.ipfsdServer.stop()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/interop",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.3",
|
|
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",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"src",
|
|
28
28
|
"dist",
|
|
29
29
|
"!dist/test",
|
|
30
|
-
"!**/*.tsbuildinfo"
|
|
30
|
+
"!**/*.tsbuildinfo",
|
|
31
|
+
".aegir.js"
|
|
31
32
|
],
|
|
32
33
|
"exports": {
|
|
33
34
|
".": {
|