(entry, category)
| 40 | } |
| 41 | |
| 42 | function mapEntry(entry, category) { |
| 43 | const productId = buildProductId(entry); |
| 44 | if (!productId) { |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | const output = { |
| 49 | productId, |
| 50 | type: category, |
| 51 | displayName: entry.name, |
| 52 | repoUrl: entry.repo, |
| 53 | tagline: entry.tagline, |
| 54 | description: entry.description, |
| 55 | scope: sanitizeArray(entry.scope, ['global']), |
| 56 | tags: sanitizeArray(entry.tags, []), |
| 57 | homepageUrl: entry.homepage, |
| 58 | installation: entry.installation, |
| 59 | minVersion: entry.min_version |
| 60 | }; |
| 61 | |
| 62 | return output; |
| 63 | } |
| 64 | |
| 65 | function stripUndefined(data) { |
| 66 | const cleaned = {}; |
no test coverage detected