Skip to content

Commit

Permalink
chore: update dkim script
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Nov 7, 2023
1 parent 4b275a6 commit ce7cb14
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions packages/scripts/update-dkim-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,21 @@ async function updateDKIMRegistry(
}
) {
const domainsFile = "./domains.txt";
// const domainPubKeyMap = await getDKIMPublicKeysForDomains(domainsFile);
const domainPubKeyMap = await getDKIMPublicKeysForDomains(domainsFile);

// if (writeToFile) {
// fs.writeFileSync(
// "out/domain-dkim-keys.json",
// JSON.stringify(domainPubKeyMap, null, 2)
// );
// }
if (writeToFile) {
if (!fs.existsSync("out")) {
fs.mkdirSync("out");
}
fs.writeFileSync(
"out/domain-dkim-keys.json",
JSON.stringify(domainPubKeyMap, null, 2)
);
}

const domainPubKeyMap = JSON.parse(
fs.readFileSync("out/domain-dkim-keys.json").toString()
);
// const domainPubKeyMap = JSON.parse(
// fs.readFileSync("out/domain-dkim-keys.json").toString()
// );

// Saving pubkeys into chunks of 121 * 17
// This is what is used in EmailVerifier.cicrom
Expand Down

0 comments on commit ce7cb14

Please sign in to comment.