INNER CODE UNIT · TypeScript

candidates

rit3zh/reacticx · cloudflare/codebase/index.ts:237

    const candidates = files.filter((file) => !plan.some((item) => item.file === file));

    log.blank();
    log.step(`Verifying ${c.bold(String(candidates.length))} object(s) against the public origin…`);

    const missing = await mapLimit(candidates, config.verifyConcurrency, async (file) => {
      try {
        return (await objectExists(file.key)) ? undefined : file;
      } catch (error) {
        throw new Error(`could not verify ${file.key}: ${(error as Error).message}`);
      }
    });

    for (const file of missing) {
      if (!file) continue;
      plan.push({ file, action: "upload", reason: "missing from bucket" });
      unchanged -= 1;
      log.warn(`${file.key} ${c.dim("— in the manifest but not in the bucket")}`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…