INNER CODE UNIT · TypeScript

localKeys

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

  const localKeys = new Set(files.map((file) => file.key));
  const scoped = new Set(sources.map((source) => source.id));
  const stale = Object.entries(manifest.entries).filter(
    ([key, entry]) => scoped.has(entry.source) && !localKeys.has(key),
  );

  const pendingBytes = plan.reduce((total, item) => total + item.file.size, 0);

  log.blank();
  log.step(
    `${c.bold(String(files.length))} files · ${c.green(`${plan.length} to upload`)} · ` +
      `${c.dim(`${unchanged} unchanged`)}${stale.length > 0 ? ` · ${c.yellow(`${stale.length} stale`)}` : ""}`,
  );

  /* ---- check ------------------------------------------------------------ */

  if (flags.check) {
    const problems = plan.length + (flags.prune ? stale.length : 0);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…