(state)
| 5791 | // ============================================================ |
| 5792 | |
| 5793 | async function refreshOAuthUrlBeforeStep6(state) { |
| 5794 | await addLog(`步骤 6:正在刷新登录用的 ${getPanelModeLabel(state)} OAuth 链接...`); |
| 5795 | console.log(LOG_PREFIX, '[refreshOAuthUrlBeforeStep6] requesting fresh OAuth directly from panel'); |
| 5796 | const refreshResult = await requestOAuthUrlFromPanel(state, { logLabel: '步骤 6' }); |
| 5797 | await handleStepData(1, refreshResult); |
| 5798 | |
| 5799 | if (!refreshResult?.oauthUrl) { |
| 5800 | throw new Error('刷新 OAuth 链接后仍未拿到可用链接。'); |
| 5801 | } |
| 5802 | |
| 5803 | return refreshResult.oauthUrl; |
| 5804 | } |
| 5805 | |
| 5806 | function isStep6SuccessResult(result) { |
| 5807 | return result?.step6Outcome === 'success'; |
no test coverage detected