UCD.js Docs

Pipelines

Guide to the UCD.js pipeline system, from core concepts to debugging

The @ucdjs/pipeline-* packages provide the internal extraction and data-production path for UCD.js. A pipeline definition describes:

  • which versions to process
  • which sources provide files
  • which routes should match those files
  • which transforms and dependencies should shape execution order
  • which outputs should be emitted or published

These docs focus on the live authoring model used in the repo today. That means route dependencies are modeled with depends and ctx.getRouteData(...), execution is handled by @ucdjs/pipeline-executor, and published results are configured through route outputs.

Mental model

At a high level, pipeline authoring works like this:

  1. Define a pipeline in a *.ucd-pipeline.ts file.
  2. Add one or more sources that expose versioned files.
  3. Add routes with filters, parsers, optional transforms, and resolvers.
  4. Express route dependencies with depends.
  5. Run the definition through the CLI or @ucdjs/pipeline-executor.
  6. Inspect results in the Pipeline Server when you need execution-level debugging.

Package roles

The pipeline system is split across focused packages:

  • @ucdjs/pipeline-core: definitions, filters, route/source/output types, transforms, and helpers
  • @ucdjs/pipeline-executor: runtime execution, logging hooks, traces, caching, and pipeline ordering
  • @ucdjs/pipeline-loader: discovery and loading of *.ucd-pipeline.ts files from local or remote sources
  • @ucdjs/pipeline-presets: shared parsers, resolvers, routes, and pipeline factories
  • @ucdjs/pipeline-server: local UI and server for inspection, execution history, logs, traces, and graphs

Start where you need to start

These packages are powerful and heavily used inside the monorepo, but they should still be treated as advanced infrastructure. Prefer the documented helpers and playground patterns over ad-hoc experimentation.

On this page