This repository was archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy path.aegir.js
69 lines (65 loc) · 1.61 KB
/
.aegir.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
'use strict'
const { createServer } = require('ipfsd-ctl')
const MockPreloadNode = require('./test/utils/mock-preload-node')
const path = require('path')
let preloadNode = MockPreloadNode.createNode()
let ipfsdServer
module.exports = {
bundlesize: { maxSize: '550kB' },
karma: {
files: [{
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*',
watched: false,
served: true,
included: false
}],
browserNoActivityTimeout: 600 * 1000
},
webpack: {
node: {
// required by the nofilter module
stream: true,
// required by the core-util-is module
Buffer: true
}
},
hooks: {
node: {
pre: async () => {
await preloadNode.start()
},
post: async () => {
await preloadNode.stop()
}
},
browser: {
pre: async () => {
await preloadNode.start()
ipfsdServer = await createServer({
host: '127.0.0.1',
port: 57483
}, {
type: 'js',
ipfsModule: require(__dirname),
ipfsHttpModule: require(path.join(__dirname, '..', 'ipfs-http-client')),
ipfsBin: path.resolve(path.join(__dirname, '..', 'ipfs', 'src', 'cli.js')),
ipfsOptions: {
libp2p: {
dialer: {
dialTimeout: 60e3 // increase timeout because travis is slow
}
}
}
}, {
go: {
ipfsBin: require('go-ipfs').path()
}
}).start()
},
post: async () => {
await ipfsdServer.stop()
await preloadNode.stop()
}
}
}
}