conductor.js
function synthesize ({ name, composition, ast, version: composer, annotations = [] }) {
  const code = `// generated by composer v${composer} and conductor v${version}\n\nconst composition = ${JSON.stringify(composition, null, 4)}\n\n// do not edit below this point\n\n` +
    minify(`const main=(${main})(composition)`, { output: { max_line_len: 127 } }).code
  annotations = annotations.concat([{ key: 'conductor', value: ast }, { key: 'composerVersion', value: composer }, { key: 'conductorVersion', value: version }])
  return { name, action: { exec: { kind: 'nodejs:default', code }, annotations } }
}
function synthesize ({ name, composition, ast, version: composer, annotations = [] }) {
  const code = `// generated by composer v${composer} and conductor v${version}\n\nconst composition = ${JSON.stringify(composition, null, 4)}\n\n// do not edit below this point\n\n` +
    minify(`const main=(${main})(composition)`, { output: { max_line_len: 127 } }).code
  annotations = annotations.concat([{ key: 'conductor', value: ast }, { key: 'composerVersion', value: composer }, { key: 'conductorVersion', value: version }])
  return { name, action: { exec: { kind: 'nodejs:default', code }, annotations } }
}
function synthesize ( { name , composition , ast , version : composer , annotations = [ ] } ) { const code = ` ${ composer } ${ version } \n \n ${ JSON . stringify ( composition , null , 4 ) } \n \n \n \n ` + minify ( ` ${ main } ` , { output : { max_line_len : 127 } } ) . code annotations = annotations . concat ( [ { key : 'conductor' , value : ast } , { key : 'composerVersion' , value : composer } , { key : 'conductorVersion' , value : version } ] ) return { name , action : { exec : { kind : 'nodejs:default' , code } , annotations } } }
synthesize conductor action code from composition
synthesize conductor action code from composition