import fs from "fs"; import path from "path"; import CID from "cids"; import { DeclCalculator } from "./utils"; import { classicUiIpfsCid, novaUiIpfsCid, relayersUiIpfsCid, docsIpfsCid } from "./constants"; const convertCIDToV1 = (cidV0: string) => `"${new CID(cidV0).toV1().toString()}"`; const { calculateDecl } = new DeclCalculator("const", "", convertCIDToV1); const typescriptCode = calculateDecl({ classicUiIpfsCid }) + calculateDecl({ novaUiIpfsCid }) + calculateDecl({ relayersUiIpfsCid }) + calculateDecl({ docsIpfsCid }); fs.writeFileSync(path.join(".", "data", "ipfsV1CIDs.txt"), typescriptCode);