Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var localUrl = 'http://' + host;
// add tunnel details
config.tunnel = {
host: host,
gzip: true,
cache: true
};
// generate config format expected by screener-runner
config.states = transformToStates(config.storybook, localUrl, config.storybookPreview);
// remove storybook-specific fields
config = omit(config, ['storybook', 'storybookConfigDir', 'storybookStaticDir', 'storybookStaticBuildDir', 'storybookPort', 'storybookApp', 'storybookVersion', 'storybookBinPath', 'storybookPreview']);
if (options && options.debug) {
console.log('DEBUG: config', JSON.stringify(config, null, 2));
}
// send storybook states to screener-runner
return Runner.run(config);
});
};