MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / fetchGeneratedEmail

Function fetchGeneratedEmail

background/generated-email-helpers.js:188–204  ·  view source on GitHub ↗
(state, options = {})

Source from the content-addressed store, hash-verified

186 }
187
188 async function fetchGeneratedEmail(state, options = {}) {
189 const currentState = state || await getState();
190 const generator = normalizeEmailGenerator(options.generator ?? currentState.emailGenerator);
191 if (generator === 'custom') {
192 throw new Error('当前邮箱生成方式为自定义邮箱,请直接填写注册邮箱。');
193 }
194 if (generator === 'icloud') {
195 return fetchIcloudHideMyEmail();
196 }
197 if (generator === 'cloudflare') {
198 return fetchCloudflareEmail(currentState, options);
199 }
200 if (generator === CLOUDFLARE_TEMP_EMAIL_GENERATOR) {
201 return fetchCloudflareTempEmailAddress(currentState, options);
202 }
203 return fetchDuckEmail(options);
204 }
205
206 return {
207 ensureCloudflareTempEmailConfig,

Callers 1

handleMessageFunction · 0.70

Calls 6

getStateFunction · 0.85
normalizeEmailGeneratorFunction · 0.85
fetchIcloudHideMyEmailFunction · 0.85
fetchCloudflareEmailFunction · 0.70
fetchDuckEmailFunction · 0.70

Tested by

no test coverage detected