(state: State, collection: Collection, entry: EntryValue)
| 1128 | } |
| 1129 | |
| 1130 | async processEntry(state: State, collection: Collection, entry: EntryValue) { |
| 1131 | const integration = selectIntegration(state.integrations, null, 'assetStore'); |
| 1132 | const mediaFolders = selectMediaFolders( |
| 1133 | state.config, |
| 1134 | collection, |
| 1135 | fromJS(entry) as unknown as EntryMap, |
| 1136 | ); |
| 1137 | if (mediaFolders.length > 0 && !integration) { |
| 1138 | const files = await Promise.all( |
| 1139 | mediaFolders.map(folder => this.implementation.getMedia(folder)), |
| 1140 | ); |
| 1141 | entry.mediaFiles = entry.mediaFiles.concat(...files); |
| 1142 | } else { |
| 1143 | entry.mediaFiles = entry.mediaFiles.concat(state.mediaLibrary.get('files') || []); |
| 1144 | } |
| 1145 | |
| 1146 | return entry; |
| 1147 | } |
| 1148 | |
| 1149 | async unpublishedEntry(state: State, collection: Collection, slug: string) { |
| 1150 | const entryData = await this.implementation!.unpublishedEntry!({ |
no test coverage detected