import { stripIndent } from 'common-tags' ; import json2md from 'json2md' ; import { executor , getOrb , normalizeString } from '../scripts/utils' ; const orb = getOrb ( ) ; const docExecutor = ( name , executor ) => { const image = executor . docker [ 0 ] . image ; const list = [ { h2 : name } , { p : normalizeString ( executor . description ) } , { p : `Docker image: \`${ image }\`` } , ] ; return list ; } ; const executorNames = Object . keys ( orb . executors ) ; const fragments = executorNames . map ( ( name ) => { return docExecutor ( name , orb . executors [ name ] ) ; } ) ; const header = { h1 : 'Executors' } ; const description = { p : normalizeString ( stripIndent `
    Docker images that jobs can use via \`executor\` parameter.
    Typically an image comes from the [cypress-io/cypress-docker-images](https://github.com/cypress-io/cypress-docker-images) repo
  ` ) } ; const contents = [ ] . concat ( header ) . concat ( description ) . concat ( ... fragments ) ; const md = json2md ( contents ) ; console . log ( md ) ;