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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719 |
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
16x
16x
4x
16x
16x
16x
11x
1x
10x
10x
10x
16x
1x
3x
12x
3x
1x
1x
1x
1x
3x
1x
1x
1x
1x
3x
3x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
9x
1x
1x
9x
1x
1x
1x
1x
1x
1x
1x
1x
1x
3x
3x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
1x
3x
3x
1x
1x | 'use strict';
const path = require('path');
const fs = require('fs');
const semver = require('semver');
const _ = require('lodash');
const versionUtils = require('./utils/versionUtils');
const requir = require('./utils/requirements');
const cmdParams = require('./params');
const logger = require('./logger');
const scullion = require('./globalScullion');
const constants = require('./utils/constants');
let initOptions = null;
let config = null;
let mergedConfig = null;
/**
* Merge two object. Added allways win. Thats means that in case of colision added is keeped.
*
* @param orig: Origin object
* @param added: Object to be added, winning!
* @returns {*} Object merged
* @private
*/
const _mergeObject = function(orig, added) {
logger.silly('#green', 'config:_mergeObject');
if (orig === undefined) {
orig = {};
}
Iif (added === undefined) {
added = {};
} else {
added = JSON.parse(JSON.stringify(added));
}
for (const name in orig) {
if (added[name] && Object.prototype.toString.call(added[name]) === '[object Object]') {
added[name] = _mergeObject(orig[name], added[name]);
} else Iif (added[name] && Object.prototype.toString.call(added[name]) === '[object Array]') {
for (const i in orig[name]) {
if (added[name].indexOf(orig[name][i]) < 0 && Object.prototype.toString.call(orig[name][i]) !== '[object Object]') {
added[name].push(orig[name][i]);
}
}
} else {
Eif (added[name] === undefined) {
added[name] = orig[name];
}
}
}
return added;
};
const _mergeUnit = function(lconfig, recipe) {
lconfig = _mergeObject(lconfig, recipe.config);
scullion.elements.forEach(element => lconfig[element] = _mergeObject(lconfig[element], recipe[element]));
return lconfig;
};
const _mergeConfig = function(recipes) {
logger.silly('#green', 'config:_mergeConfig');
let resConfig = {};
Object.getOwnPropertyNames(recipes)
.reverse()
.forEach((name) => {
resConfig = _mergeUnit(resConfig, recipes[name]);
});
return resConfig;
};
const isInstalled = (cooked, requires) => {
let installed = false;
if (requires) {
installed = true;
if (requires !== constants.notBuild) {
for (const module in requires) {
if (cooked.recipes[module]) {
const reqVersion = versionUtils.getVersion(requires[module]);
if (reqVersion === true || semver.lte(reqVersion, cooked.recipes[module].version)) {
logger.trace(module, '- versions: installed:', '#cyan', cooked.recipes[module].version, 'needed:', '#cyan', reqVersion, '#green', '- installed!');
} else {
logger.trace(module, '- versions: installed:', '#cyan', cooked.recipes[module].version, 'needed:', '#cyan', reqVersion, '#yellow', '- not installed!');
installed = false;
}
} else {
logger.trace(module, '#yellow', '- not installed!');
installed = false;
}
}
}
}
return installed;
};
const checkInstalled = (cooked) => {
Object.getOwnPropertyNames(cooked.recipes).forEach((recipeName) => {
Eif (cooked.recipes[recipeName].flows) {
Object.getOwnPropertyNames(cooked.recipes[recipeName].flows).forEach((flowName) => {
if (cooked.recipes[recipeName].flows[flowName].steps) {
Object.getOwnPropertyNames(cooked.recipes[recipeName].flows[flowName].steps).forEach((stepName) => {
for (const type in cooked.recipes[recipeName].flows[flowName].steps[stepName]) {
if (isInstalled(cooked, cooked.recipes[recipeName].flows[flowName].steps[stepName][type].requires)) {
cooked.recipes[recipeName].flows[flowName].steps[stepName][type].installed = true;
}
}
});
}
});
}
});
return cooked;
};
const addImplementations = (implementations, _config) => {
Iif (implementations) {
Object.getOwnPropertyNames(_config.recipes).forEach((recipeName) => {
if (_config.recipes[recipeName].flows) {
Object.getOwnPropertyNames(_config.recipes[recipeName].flows).forEach((flowName) => {
Object.getOwnPropertyNames(_config.recipes[recipeName].flows[flowName].steps).forEach((stepName) => {
if (implementations[stepName]) {
Object.getOwnPropertyNames(implementations[stepName]).forEach((context) => {
logger.trace('add requires from implementations ->', '#cyan', recipeName, 'flow:', '#green', flowName, 'step:', '#green', stepName, 'context:', '#cyan', context);
_config.recipes[recipeName].flows[flowName].steps[stepName][context] = {
requires: implementations[stepName][context] === constants.notBuild ? constants.notBuild : versionUtils.line2Requires(implementations[stepName][context])
};
});
}
});
});
}
});
}
return _config;
};
/**
*
* Builds a config object with all the configuration of one execution. This object is build in the begging of every execution and is use by all the piscosour elements.
*
*/
const instantiate = function() {
config = scullion.cook(initOptions);
logger.debug('Scullion ends', '#green', 'Config is cooked:', JSON.stringify(config, null, 2));
mergedConfig = _mergeConfig(config.recipes);
config = addImplementations(mergedConfig.implementations, config);
config = checkInstalled(config);
mergedConfig.rootDir = process.cwd();
mergedConfig.recipes = config.recipes;
logger.debug('Merge ends', '#green', 'Merged Config: ', JSON.stringify(mergedConfig, null, 2));
};
const getConfig = () => {
if (!config) {
logger.trace('#green', 'Instanciate config');
instantiate();
}
return config;
};
const _getGen = function(normal, type) {
logger.silly('#green', 'config:_getGen -in-', normal, type);
let obj;
if (normal.recipe) {
obj = getConfig().recipes[normal.recipe][type][normal.name];
} else {
obj = mergedConfig[type][normal.name];
}
logger.silly('#green', 'config:_getGen -out-', obj);
return obj;
};
const _precededParams = function(params) {
if (mergedConfig.params) {
params = _mergeObject(params, mergedConfig.params);
}
const localParams = _.get(getConfig(), 'recipes.configLocal.config.params', false);
if (localParams) {
params = _mergeObject(params, getConfig().recipes.configLocal.config.params);
}
return params;
};
const _normalStep = function(normal) {
const normalCopy = _.clone(normal);
normalCopy.origName = normal.name;
normalCopy.name = normal.name.indexOf(':') >= 0 ? normal.name.split(':')[0] : normal.name;
return normalCopy;
};
const allContexts = function() {
const result = [];
if (mergedConfig && mergedConfig.contexts) {
Object.getOwnPropertyNames(mergedConfig.contexts).forEach((context) => result.push(context));
}
return result;
};
const getContexts = function(flow, recipeKey, strict) {
let data = mergedConfig;
const steps = mergedConfig.steps;
let tmp = {};
if (recipeKey) {
data = getConfig().recipes[recipeKey];
}
Object.getOwnPropertyNames(mergedConfig.contexts).forEach(name => tmp[name] = 0);
let def = 0;
let total = 0;
if (flow.steps) {
Object.getOwnPropertyNames(flow.steps).forEach((name) => {
total++;
const step = _.merge(steps[name] || {}, flow.steps[name] || {});
if (flow.steps[name].type === 'flow') {
strict = false;
total--;
}
Object.getOwnPropertyNames(step).forEach((type) => {
if (type === 'default') {
def++;
}
if (tmp[type] !== undefined) {
tmp[type]++;
}
});
});
}
const res = [];
Object.getOwnPropertyNames(tmp).forEach((_type) => {
if (strict) {
if ((tmp[_type] + def) === total) {
res.push(_type);
}
} else {
if ((tmp[_type] + def) > 0) {
res.push(_type);
}
}
});
return res;
};
const _getUniqueFlow = function(flowsIn, normal) {
logger.trace('#green', '_getUniqueFlow', 'Obtaining flow by context');
const flows = [];
flowsIn.forEach((pair) => {
const contexts = getContexts(pair.flow);
if (_.intersection(normal.context, contexts).length > 0) {
flows.push(pair);
}
});
if (flows.length === 1) {
flows[0].flow.recipe = flows[0].recipe;
return flows[0].flow;
}
if (flows.length > 1) {
let error = 'flow: "' + normal.name + '" Ambiguous for context "' + normal.context + '"!! steps are the same in multiple recipes: ';
flows.forEach((pair) => {
error += pair.recipe.name + ' version: ' + pair.recipe.version + ' | ';
});
throw new Error(error);
}
return;
};
/**
* Example inside a step.
*
* ```
* const flow = this.config.getFlow(normal);
* ```
* @param normal: Object with the context , name, recipeKey of the flow that you
* @return Object with the configuration of a flow.
*/
const getFlow = function(normal) {
const flows = [];
Object.getOwnPropertyNames(getConfig().recipes).forEach((name) => {
const recipe = getConfig().recipes[name];
Iif (recipe.name && recipe.flows && recipe.flows[normal.name]) {
flows.push({
recipe: recipe,
flow: recipe.flows[normal.name]
});
}
});
Eif (flows.length === 0) {
return;
}
return flows.length === 1 ? flows[0].flow : _getUniqueFlow(flows, normal);
};
/**
* normal has this aspect:
*
* ```
* normal = {name: *, context: *, orig: *, recipe: *, isStep: *}
* ```
* Checks if a normal object is available in this recipe
* @param normal
* @returns {boolean}
*/
const isAvailable = function(normal) {
let res = false;
if (normal.isStep) {
res = _getGen(normal, 'steps') !== undefined;
} else {
res = getFlow(normal) !== undefined;
}
logger.trace('#green', 'config:isAvailable:', normal, ':', res);
return res;
};
/**
* Obtain all information of a step.
*
* @param name
* @returns {{types: Array, recipes: Array, description: string}} types: All types where implementation is available, recipes: All recipes that this step is implemented, description: Text describing this step.
*/
const getStepInfo = function(name) {
const info = {
types: [],
recipes: [],
description: ''
};
Object.getOwnPropertyNames(getConfig().recipes).forEach((recipeName) => {
const recipe = getConfig().recipes[recipeName];
if (recipe.name && recipe.steps && recipe.steps[name]) {
info.recipes.push({name: recipe.name, version: recipe.version, dir: recipe.dir});
Object.getOwnPropertyNames(recipe.steps[name]).forEach((type) => {
info.types.push(type === 'default' ? 'all' : type);
info.description = recipe.steps[name][type].description;
});
}
});
return info;
};
const _getRequirements = function() {
let requirements = {};
Object.getOwnPropertyNames(getConfig().recipes).forEach((recipeName) => {
const recipe = getConfig().recipes[recipeName];
if (recipe.name && recipe.steps) {
Object.getOwnPropertyNames(recipe.steps).forEach((name) => {
Object.getOwnPropertyNames(recipe.steps[name]).forEach((type) => {
if (recipe.steps[name][type].requirements) {
Object.getOwnPropertyNames(recipe.steps[name][type].requirements).forEach((req) => {
if (recipe.steps[name][type].requirements[req].version || requirements[req] && requirements[req].version) {
if (!requirements[req]) {
requirements[req] = {version: undefined};
}
const versions = [recipe.steps[name][type].requirements[req].version, requirements[req].version];
requirements[req].version = versionUtils.getMajor(versions);
}
requirements[req] = _mergeObject(recipe.steps[name][type].requirements[req], requirements[req]);
});
}
});
});
}
});
const purged = {};
Object.getOwnPropertyNames(mergedConfig.params.versions).forEach((req) => {
if (requirements[req]) {
purged[req] = mergedConfig.params.versions[req];
}
});
return _mergeObject(purged, requirements);
};
const saveRequirements = function(filtered) {
const requirements = _getRequirements();
const allFathers = _mergeObject(requirements, mergedConfig.params.versions);
const promises = [];
Object.getOwnPropertyNames(requirements).forEach((req) => {
if (filtered && requirements[req].installer) {
delete requirements[req];
} else {
const options = allFathers[req];
const father = allFathers[options.listedIn];
promises.push(Promise.resolve()
.then(() => requir.sh(req, options, father))
.then((result) => requir.check(req, options, result, father), (result) => requir.check(req, options, result, father))
.then((out) => {
if (!out.uncheckable) {
delete requirements[req];
}
})
.catch((e) => e)
);
}
});
return Promise.all(promises)
.then(() => {
const fileName = 'requirements.json';
logger.info('writing', '#green', fileName, 'for all installed steps');
fs.writeFileSync(fileName, JSON.stringify(requirements, null, 2));
});
};
const _getStep = function(normalIn) {
logger.silly('#green', 'config:_getStep -in-', normalIn);
const normal = _normalStep(normalIn);
const globalStep = _getGen(normal, 'steps');
if (globalStep) {
let step = globalStep.default;
step = _mergeObject(step, globalStep[normal.context]);
logger.silly('#green', 'config:_getStep -out-', step);
return step;
}
};
/**
* set params in a step context: with this order of preference
* 1. .piscosour/piscosour.json
* 2. your recipe piscosour.json
* 3. params.json of default
* 4. params.json of context
* @param normal
* @returns {*}
*/
const getStepParams = function(normal) {
logger.silly('#green', 'config:getStepParams -in-', normal);
const contexts = _.clone(normal.context);
const normalSteps = _.fromPairs(_.map(contexts, context => [context, _.merge(_.clone(normal), {context: context})]));
const paramsSteps = _.fromPairs(_.map(normalSteps, normalStep => [normalStep.context, _getStep(normalStep)]));
const applyMerger = (paramsStep) => {
let params = _.cloneDeep(paramsStep);
const localParams = _.get(getConfig(), `recipes.configLocal.config.steps.${normal.name}.params`, false);
if (localParams) {
params = _mergeObject(params, localParams);
}
return params;
};
const finalParams = _.fromPairs(_.map(normalSteps, normalStep => [normalStep.context, _precededParams(applyMerger(paramsSteps[normalStep.context]))]));
logger.silly('#green', 'config:getStepParams -out-', finalParams);
return finalParams;
};
/**
* set params in a flow context: with this order of preference
* 1. .piscosour/piscosour.json
* 2. your recipe piscosour.json
* 3. flow.json (3.1 - params, 3.2 - defaul, 3.3 - context)
* 4. params.json of default
* 5. params.json of context
* @param normalStep
* @param normal
*/
const getFlowParams = function(normalStep, normalFlow) {
logger.silly('#green', 'config:getFlowParams -in-', 'step:', normalStep, 'flow:', normalFlow);
const contexts = _.clone(normalStep.context);
const flow = getFlow(normalFlow);
const normalsByContext = _.chain(contexts)
.map(context => [
context,
_.chain(normalStep)
.clone()
.merge({ context: context }).value()
])
.fromPairs().value();
const stepsByContext = _.chain(normalsByContext)
.filter(normalWithContext => normalWithContext.type !== 'flow')
.map(normalWithContext => [normalWithContext.context, _getStep(normalWithContext)])
.fromPairs().value();
const priorityMergersByContext = _.chain(contexts)
.map(context => [
context,
[
_.get(flow, 'params', false),
_.get(flow, `steps.${normalStep.name}.params`, false),
_.get(flow, `steps.${normalStep.name}.${context}.params`, false),
_.get(normalStep, `params.${context}`, false),
_.get(getConfig(), `recipes.configLocal.config.flows.${normalFlow.name}.steps.${normalStep.name}.params`, false),
_.get(getConfig(), `recipes.configLocal.config.steps.${normalStep.name}.params`, false),
_.get(getConfig(), `recipes.configLocal.config.flows.${normalFlow.name}.params`, false)
]
])
.fromPairs().value();
const applyPriorities = (normalStep_, paramsStep) => {
let merger = priorityMergersByContext[normalStep_.context] || [];
let params = _.clone(paramsStep);
merger.forEach(step => {
if (step) {
params = _mergeObject(params, step);
}
});
return params;
};
const finalParams = _.chain(normalsByContext)
.map(normalStep_ => [
normalStep_.context,
_precededParams(applyPriorities(normalStep_, stepsByContext[normalStep_.context]))
])
.fromPairs().value();
logger.silly('#green', 'config:getFlowParams -out- ', finalParams);
return finalParams;
};
/**
* obtain the location of a recipe in the fileSystem.
*
* @param name recipeKey
* @returns String: Directory of one recipe
*/
const getDir = function(name) {
let dir;
Eif (getConfig().recipes[name]) {
dir = getConfig().recipes[name].dir;
}
Iif (name === 'piscosour' && !dir) {
dir = getConfig().recipes.module.dir;
}
return dir;
};
const _readStep = function(recipeName, normal) {
const roots = [ getConfig().recipes[recipeName] ];
if (normal.flowName && getConfig().recipes[recipeName].flows && getConfig().recipes[recipeName].flows[normal.flowName]) {
roots.push(getConfig().recipes[recipeName].flows[normal.flowName]);
}
const result = roots.map((root) => {
let step = _.get(root, `steps.${normal.name}.${normal.context}`, null);
if (!step) {
step = _.get(root, `steps.${normal.name}.default`, null);
} else {
step._context = normal.context;
}
return step;
})
.filter(element => element !== null);
return result && result.length > 0 ? result[0] : null;
};
const _getFlowFromStep = function(normal) {
return getFlow({
name: normal.flowName,
orig: `${normal.context}:${normal.flowName}`,
context: [ normal.context ],
flowName: normal.flowName
});
};
const _loadStep = function(normal) {
let tempStep = null;
const found = Object.getOwnPropertyNames(getConfig().recipes)
.reverse()
.map((recipeName) => {
let step = _readStep(recipeName, normal);
if (step !== null) {
logger.trace('#green', 'config:_loadStep', `step [${step._context ? step._context : 'default'}::${normal.name}] found in recipe: ${recipeName}`);
logger.trace('#green', 'config:_loadStep module:', step._module ? step._module : 'not yet installed!!');
if (tempStep) {
if (step.requires && !tempStep.requires) {
step = step.installed ? tempStep : step;
} else {
logger.trace('#yellow', 'step', '#bold', tempStep.name, '#red', 'is overwritten by step:', '#bold', step._module, 'in recipe:', recipeName);
}
}
tempStep = step;
if (step._module) {
const context = step._context;
step = require(step._module);
step._context = context;
}
step._flow = _getFlowFromStep(normal);
step.name = normal.name;
step.params = normal.params;
step.params.description = step.params.description || `Installing ${normal.name}`;
} else {
logger.trace('#green', 'config:_loadStep', `step [${normal.name}] not found in recipe: ${recipeName}`);
}
return step;
})
.filter((element) => element !== null)
.pop();
return found || null;
};
const _loadPlugins = function(normal) {
const plugins = {};
const normalPlugins = _.get(normal, 'params.plugins', []);
normalPlugins.forEach((pluginName) => {
plugins[pluginName] = Object.getOwnPropertyNames(getConfig().recipes)
.reverse()
.map((recipeName) => {
const plugin = _.get(getConfig().recipes[recipeName], `plugins.${pluginName}`, {});
if (plugin._module) {
logger.trace('#green', 'config:_loadPlugins plugin', pluginName, 'found in recipe:', recipeName);
logger.trace('#green', 'config:_loadPlugins module:', plugin._module);
if (plugins[pluginName]) {
logger.warn('#yellow', 'plugin', '#bold', pluginName, '#red', 'is overwritten by:', '#bold', plugin._module, 'from recipe:', recipeName);
}
return require(plugin._module);
}
return null;
})
.filter(element => element !== null)
.pop();
});
return plugins;
};
/**
* Instantiate a step **new Step** from all configurations in all recipes
*
* @param normal
* @returns {{}} Object Step, with all the plugins and configurations inyected
*/
const load = function(normal) {
logger.silly('#green', 'config:load -in-', normal);
const normalCopy = _normalStep(normal);
normalCopy.params = cmdParams.merge(normal.params);
const step = _loadStep(normalCopy);
const plugins = _loadPlugins(normalCopy);
logger.silly('#green', 'config:load -out step-', step);
logger.silly('#green', 'config:load -out plugins-', plugins);
return {
step: step,
plugins: plugins
};
};
const or = (a, b) => a || b;
const isUninstalledStep = function(type, step) {
return step[type] !== undefined && !step[type].installed && !_.isEmpty(step[type].requires);
};
const isUninstalledFlow = function(type, flow) {
return _.chain(flow.steps)
.map(step => isUninstalledStep(type, step))
.reduce(or)
.value();
};
const isInstalledFlow = function(type, flow) {
const _type = type === undefined ? 'default' : type;
return !isUninstalledFlow(_type, flow);
};
const isInstalledStep = function(type, step) {
return !isUninstalledStep(type, step);
};
const getMergedConfig = () => {
getConfig();
return mergedConfig;
};
const finalConfig = {
get: getMergedConfig,
load: load,
setOptions: (_options) => {
initOptions = _options;
return finalConfig;
},
refresh: instantiate,
getDir: getDir,
saveRequirements: saveRequirements,
allContexts: allContexts,
getContexts: getContexts,
getFlow: getFlow,
getFlowParams: getFlowParams,
getStepInfo: getStepInfo,
getStepParams: getStepParams,
isAvailable: isAvailable,
isInstalledFlow: isInstalledFlow,
isInstalledStep: isInstalledStep,
mergeObject: _mergeObject
};
module.exports = finalConfig; |