-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.js
More file actions
37 lines (31 loc) · 868 Bytes
/
main.js
File metadata and controls
37 lines (31 loc) · 868 Bytes
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
const Utils = require('./src/utils')
const { ChildrenManager } = require('./src/sevices')
process.env.SUPPRESS_NO_CONFIG_WARNING = 'y'
const config = require('config')
function Testkit (configs = {}) {
const testkitDefaultConfigs = require('./config/default')['aa-testkit']
config.util.extendDeep(testkitDefaultConfigs, configs)
config.util.setModuleDefaults('aa-testkit', testkitDefaultConfigs)
const Nodes = require('./src/nodes')
const Network = require('./src/networks')
const Custom = {
Node: require('./src/nodes/CustomNode/CustomNode'),
Child: require('./src/nodes/CustomNode/child/CustomNodeChild'),
}
return {
Nodes,
Network,
Utils,
Custom,
}
}
process.on('exit', () => {
ChildrenManager.stop()
})
process.on('SIGINT', () => {
process.exit()
})
process.on('SIGTERM', () => {
process.exit()
})
module.exports = { Testkit, Utils }