( shortCode: string, errorSummary: string, logs: string, deploymentSpinner: ReturnType<typeof spinner>, warnings?: string[], errors?: string[] )
| 672 | } |
| 673 | |
| 674 | async function failDeploy( |
| 675 | shortCode: string, |
| 676 | errorSummary: string, |
| 677 | logs: string, |
| 678 | deploymentSpinner: ReturnType<typeof spinner>, |
| 679 | warnings?: string[], |
| 680 | errors?: string[] |
| 681 | ) { |
| 682 | deploymentSpinner.stop(`Failed to deploy project`); |
| 683 | |
| 684 | // If there are logs, let's write it out to a temporary file and include the path in the error message |
| 685 | if (logs.trim() !== "") { |
| 686 | const logPath = await saveLogs(shortCode, logs); |
| 687 | |
| 688 | printWarnings(warnings); |
| 689 | printErrors(errors); |
| 690 | |
| 691 | checkLogsForErrors(logs); |
| 692 | |
| 693 | outro(`${chalkError("Error:")} ${errorSummary}. Full build logs have been saved to ${logPath}`); |
| 694 | } else { |
| 695 | outro(`${chalkError("Error:")} ${errorSummary}.`); |
| 696 | } |
| 697 | |
| 698 | // TODO: Let platform know so it can fail the deploy with an appropriate error |
| 699 | } |
| 700 | |
| 701 | // Poll every 1 second for the deployment to finish |
| 702 | async function waitForDeploymentToFinish( |
no test coverage detected
searching dependent graphs…