* Bump deps

* Cleanups
This commit is contained in:
Jaco
2023-08-18 10:31:41 +03:00
committed by GitHub
parent cfdef1e760
commit 9c19e5f16a
7 changed files with 878 additions and 627 deletions
+5 -5
View File
@@ -17,8 +17,8 @@ const PINMETA = {
/** @type {PinataClient} */
// @ts-expect-error For some reason we have issues here...
const pinata = new PinataSDK({
pinataApiKey: process.env.PINATA_API_KEY,
pinataSecretApiKey: process.env.PINATA_SECRET_KEY
pinataApiKey: process.env['PINATA_API_KEY'],
pinataSecretApiKey: process.env['PINATA_SECRET_KEY']
});
async function wait (delay = 2500) {
@@ -53,7 +53,7 @@ async function unpin (exclude) {
.map((r) => r.ipfs_pin_hash)
.filter((/** @type { string} */ hash) => hash !== exclude);
for (let i = 0; i < hashes.length; i++) {
for (let i = 0, count = hashes.length; i < count; i++) {
const hash = hashes[i];
try {
@@ -74,12 +74,12 @@ async function unpin (exclude) {
async function dnslink (hash) {
const records = [`_dnslink.${SUB_DOMAIN}.${DOMAIN}`];
for (let i = 0; i < records.length; i++) {
for (let i = 0, count = records.length; i < count; i++) {
const record = records[i];
try {
await cloudflare(
{ token: process.env.CF_API_TOKEN },
{ token: process.env['CF_API_TOKEN'] },
{ link: `/ipfs/${hash}`, record, zone: DOMAIN }
);