1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', {
|
4 | value: true
|
5 | });
|
6 |
|
7 | const config = require('@boost/config');
|
8 |
|
9 | class Config extends config.Configuration {
|
10 | blueprint(predicates, onConstruction) {
|
11 | const bool = predicates.bool,
|
12 | number = predicates.number,
|
13 | object = predicates.object,
|
14 | shape = predicates.shape,
|
15 | string = predicates.string;
|
16 | const moduleSchema = string(process.env.BEEMO_CONFIG_MODULE);
|
17 | return {
|
18 | configure: shape({
|
19 | cleanup: bool(false),
|
20 | parallel: bool(true)
|
21 | }),
|
22 | debug: bool(),
|
23 | drivers: config.createPluginsPredicate(predicates),
|
24 | execute: shape({
|
25 | concurrency: number(3).gt(0),
|
26 | graph: bool(true),
|
27 |
|
28 | output: string()
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | }),
|
38 | module: onConstruction ? moduleSchema : moduleSchema.required(),
|
39 | scripts: config.createPluginsPredicate(predicates),
|
40 | settings: object()
|
41 | };
|
42 | }
|
43 |
|
44 | bootstrap() {
|
45 | this.addProcessHandler('drivers', config.mergePlugins);
|
46 | this.addProcessHandler('scripts', config.mergePlugins);
|
47 | }
|
48 |
|
49 | }
|
50 |
|
51 | exports.Config = Config;
|
52 |
|