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

Function fetchCloudflareEmail

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

Source from the content-addressed store, hash-verified

44 }
45
46 async function fetchCloudflareEmail(state, options = {}) {
47 throwIfStopped();
48 const latestState = state || await getState();
49 const domain = normalizeCloudflareDomain(latestState.cloudflareDomain);
50 if (!domain) {
51 throw new Error('Cloudflare 域名为空或格式无效。');
52 }
53
54 const localPart = String(options.localPart || '').trim().toLowerCase() || generateCloudflareAliasLocalPart();
55 const aliasEmail = `${localPart}@${domain}`;
56
57 await setEmailState(aliasEmail);
58 await addLog(`Cloudflare 邮箱:已生成 ${aliasEmail}`, 'ok');
59 return aliasEmail;
60 }
61
62 function ensureCloudflareTempEmailConfig(state, options = {}) {
63 const {

Callers 1

fetchGeneratedEmailFunction · 0.70

Calls 6

getStateFunction · 0.85
setEmailStateFunction · 0.85
addLogFunction · 0.70
throwIfStoppedFunction · 0.50

Tested by

no test coverage detected