Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.info(getMessage("Server_Clone_Project_Not_Empty_Site_Log"));
throw new UserError("CAN_NOT_PULL_NON_EMPTY_SITE");
}
}
if (isPullForce(options)) {
if (!isWix) {
logger.info(getMessage("Server_PullForce_Project_Not_Found_Log"));
throw new UserError("CAN_NOT_PULL_NON_WIX_SITE");
}
await fs.emptyDir(siteSrcPath);
}
if (isPullMove(options)) {
if (!isWix) {
logger.info(getMessage("Server_PullMove_Project_Not_Found_Log"));
throw new UserError("CAN_NOT_PULL_NON_WIX_SITE");
}
const snapshotFolder = path.join(
siteRootPath,
".corvid",
"snapshots",
Date.now().toString()
);
await fs.move(siteSrcPath, snapshotFolder);
await fs.emptyDir(siteSrcPath);
}
let localSite, editorServer, adminServer;
const closeAll = () =>
const withStartFinishLog = callback => async (...args) => {
logger.info(`${callback.name} started`);
const result = await callback(...args);
logger.info(`${callback.name} finished`);
return result;
};