(collection: Collection)
| 1012 | } |
| 1013 | |
| 1014 | entryWithFormat(collection: Collection) { |
| 1015 | return (entry: EntryValue): EntryValue => { |
| 1016 | const format = resolveFormat(collection, entry); |
| 1017 | if (entry && entry.raw !== undefined) { |
| 1018 | const data = (format && attempt(format.fromFile.bind(format, entry.raw))) || {}; |
| 1019 | if (isError(data)) console.error(data); |
| 1020 | return Object.assign(entry, { data: isError(data) ? {} : data }); |
| 1021 | } |
| 1022 | return format.fromFile(entry); |
| 1023 | }; |
| 1024 | } |
| 1025 | |
| 1026 | async processUnpublishedEntry( |
| 1027 | collection: Collection, |
no test coverage detected