scripts

command
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

migrate_yaml rewrites tuiquery example YAMLs from the legacy data.sources + data.pipelines split into the unified polymorphic shape (one data.sources map, every entry carries a `type:`).

Run:

go run scripts/migrate_yaml.go examples/*.yaml

Per-file transforms:

  • For each entry in `data.pipelines:`:
  • Identify the operator (from / filter / project / derive / sort / union / compose / join / cache). `from:` alone → passthrough.
  • Lift the operator's sub-fields up onto the entry.
  • Add `type: <op>` at the head of the entry.
  • Move the entry into `data.sources:`.
  • For inline `pipe:` stages on any entry:
  • Convert `{filter: {where: X}}` → `{type: filter, where: X}` (same lift + type-prepend).
  • For components: rename `pipeline: X` → `source: X`.
  • Delete the `data.pipelines:` block entirely.

The yaml.v3 Node API preserves comments through edit + round-trip, so the rewritten files keep their headers and inline annotations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL