(options = {})
| 4894 | }); |
| 4895 | |
| 4896 | async function resumeAutoRunIfWaitingForEmail(options = {}) { |
| 4897 | const { silent = false } = options; |
| 4898 | const state = await getState(); |
| 4899 | if (!state.email || !isAutoRunPausedState(state)) { |
| 4900 | return false; |
| 4901 | } |
| 4902 | |
| 4903 | if (resumeWaiter) { |
| 4904 | if (!silent) { |
| 4905 | await addLog('邮箱已就绪,自动继续后续步骤...', 'info'); |
| 4906 | } |
| 4907 | resumeWaiter.resolve(); |
| 4908 | resumeWaiter = null; |
| 4909 | return true; |
| 4910 | } |
| 4911 | |
| 4912 | return false; |
| 4913 | } |
| 4914 | |
| 4915 | async function ensureAutoEmailReady(targetRun, totalRuns, attemptRuns) { |
| 4916 | const currentState = await getState(); |
no test coverage detected