UNPKG

asch-redeploy

Version:

A hassle-free local asch environment

36 lines (32 loc) 951 B
// ctor let StartUpCheck = function (config, isConfigValid, checkFileStructure, checkArch, checkPort, checkPublicDistDir, checkBlockchainVersion) { this.config = config this.isConfigValid = isConfigValid this.checkFileStructure = checkFileStructure this.checkArch = checkArch this.checkPort = checkPort this.checkPublicDistDir = checkPublicDistDir this.checkBlockchainVersion = checkBlockchainVersion this.check = () => { return this.checkArch.check() .then(() => { return this.isConfigValid.isValidSync() }) .then(() => { return this.checkFileStructure.checkSync() }) .then(() => { return this.checkPublicDistDir.createIfNotExistsSync() }) .then(() => { return this.checkPort.check() }) .then(() => { return this.checkBlockchainVersion.checkSync() }) .catch((error) => { throw error }) } } module.exports = StartUpCheck