Skip to main content

Content Mirror

@shrug/content-mirrorv2026.11.17.1· MIT· 4d agoBEHAVIORSACCEPTED WARNINGS
01README

General, typed content-mirror primitive. Rsyncs a source to a dest in ORDERED PHASES (phase N completes before phase N+1), dry-run-gated, with a no-drift verify. A real mutating transfer happens ONLY when dryRun=false AND confirm=true; every other case passes rsync -n and never mutates. deleteMode governs --delete: perPhase (inline per phase), last (additive phases then one whole-set prune pass WITH --delete, so stale files are pruned only after the index phase updates), or none. rsync is an internal detail invoked through an injectable command runner (the type never shells out opaquely and is not a command/shell passthrough). The type is domain-agnostic: apt/dpkg/pool/dists semantics live entirely in a consumer's phase config and deleteMode choice, not in the type. sync captures a mirrorRun resource (per-phase flags + planned file/byte counts, the optional prune pass, and the gating), verify captures a verifyResult (clean + itemized drift). No secrets are captured.

02Behaviors1
@shrug/content-mirrorv2026.11.17.1content-mirror.ts
fn sync()
Mirror source to dest through the configured phases in order. dryRun=true
fn verify()
Re-run the entire configured set as a dry-run with --delete to detect

Resources

mirrorRun(infinite)— Outcome of a sync run: per-phase flags/planned file & byte counts, the
verifyResult(infinite)— Outcome of a verify run: clean=true when the configured set has zero
03Stats
B
87 / 100
Downloads
3
Archive size
12.2 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository0/2missing

05Platforms
06Labels