UNPKG

1.38 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6
7const config = require('@boost/config');
8
9class 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 // Optimal requires a fix upstream. Does not support empty strings!
28 output: string()
29 /* .oneOf<ConfigExecuteStrategy>([
30 '',
31 STRATEGY_BUFFER,
32 STRATEGY_PIPE,
33 STRATEGY_STREAM,
34 STRATEGY_NONE,
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
51exports.Config = Config;
52//# sourceMappingURL=Config.js.map