1 | const loadSchema = require('./load-schema');
|
2 |
|
3 | module.exports = items => {
|
4 | return Promise.all(items.map(item => {
|
5 | return item.configuration
|
6 | .then(config => {
|
7 | item.configuration = config;
|
8 | if (config.validate) {
|
9 | item.schema = loadSchema(config.validate);
|
10 | }
|
11 | return item;
|
12 | });
|
13 | }));
|
14 | };
|