const fury = require ( 'fury' ) ; const apibParser = require ( './furyApibAdapter' ) ; const swaggerParser = require ( 'fury-adapter-swagger' ) ; fury . use ( swaggerParser ) ; fury . use ( apibParser ) ; export function parse ( source , options ) { return new Promise ( ( resolve , reject ) => { fury . parse ( { source , generateSourceMap : true , options } , ( err , result ) => { if ( result !== undefined ) { return resolve ( result . toRefract ( ) ) ; } return reject ( err ) ; } ) ; } ) ; }