Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
process.exit(1)
}
if (parseResult.hasStepsValidationErrors()) {
stepsError.default(parseResult.stepsValidationErrors)
process.exit(1)
}
if (parseResult.hasPayloadValidationErrors()) {
stepsError.default(parseResult.payloadValidationErrors)
process.exit(1)
}
// const migrationName = path.basename(argv.filePath, '.js');
// const errorsFile = path.join(process.cwd(), `errors-${migrationName}-${Date.now()}.log`);
const errorsFile = path.join(process.cwd(), `errors-${Date.now()}.log`)
const { batches } = parseResult
if (parseResult.hasValidationErrors()) {
renderMigration.renderValidationErrors(batches)
process.exit(1)
}
if (parseResult.hasRuntimeErrors()) {
renderMigration.renderRuntimeErrors(batches, errorsFile)
await writeErrorsToLog.default(parseResult.getRuntimeErrors(), errorsFile)
process.exit(1)
}
await renderMigration.renderPlan(batches)
const serverErrorsWritten = []
const tasks = batches.map((batch) => {
return {
title: batch.intent.toPlanMessage().heading,
task: () => new Listr([
{
title: 'Making requests',
task: async (_ctx, task) => {