{"size": 1286, "ext": "js", "max_stars_repo_path": "libs/actions/developer_start.js", "max_stars_repo_name": "Gottwik/enduro2", "max_stars_repo_stars_event_min_datetime": "2019-10-08T13:29:31.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-15T08:57:43.000Z", "max_issues_repo_path": "libs/actions/developer_start.js", "max_issues_repo_name": "Gottwik/enduro2", "max_issues_repo_issues_event_min_datetime": "2019-07-26T20:41:54.000Z", "max_issues_repo_issues_event_max_datetime": "2019-08-31T07:33:50.000Z", "max_forks_repo_path": "libs/actions/developer_start.js", "max_forks_repo_name": "Gottwik/enduro2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 5, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 30.619047619, "max_line_length": 94, "alphanum_fraction": 0.66718507}
// * ———————————————————————————————————————————————————————— * //
// * 	enduro.actions.developer_start
// * ———————————————————————————————————————————————————————— * //

const action = function () {}

// * vendor dependencies
const Promise = require('bluebird')
const extend = require('extend')

// * enduro dependencies
const global_data = require(enduro.enduro_path + '/libs/global_data')
const log_clusters = require(enduro.enduro_path + '/libs/log_clusters/log_clusters')
const enduro_server = require(enduro.enduro_path + '/libs/enduro_server/enduro_server')
const task_runner = require(enduro.enduro_path + '/libs/build_tools/task_runner')
const logger = require(enduro.enduro_path + '/libs/logger')
const website_app = require(enduro.enduro_path + '/libs/website_app')
const change_watcher = require(enduro.enduro_path + '/libs/developer_velocity/change_watcher')

action.prototype.action = function (config) {

	config = config || {}

	extend(true, enduro.flags, config)

	// clears the global data
	global_data.clear()

	log_clusters.log('developer_start')

	logger.timestamp('developer start', 'enduro_events')

	return enduro_server.run()
		.then(() => {
			if (!enduro.flags.nowatch) {
				return change_watcher.start_watching()
			}
		})
}

module.exports = new action()
