Skip to content

feat: replace per-template render scripts with a catalog and payload strategies - #196

Merged
atherdon merged 113 commits into
mainfrom
feat/abstract-render-scripts
Oct 13, 2026
Merged

atherdon merged 113 commits into
mainfrom
feat/abstract-render-scripts

Conversation

@atherdon

@atherdon atherdon commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Removes the duplicated per-template files and replaces them with one CLI plus a catalog. Sample payloads now live next to that CLI.

Design

  • scripts/catalog.ts — one RenderTarget per id. Campaigns (mysterium, flat-file-7) reuse a template with an override payload. Adding a template is one entry, not a new file.
  • scripts/payloads.ts — Chain of Responsibility:
    1. --payload '{...}' inline JSON
    2. --input file.json when data is passed from outside
    3. catalog loadPayload() (campaign override)
    4. registered sample data
  • scripts/render.ts — single entry: node dist/scripts/render.js --template <id> [--output path] [--input data.json] [--payload '{...}']
  • scripts/samples/ — sample payloads moved out of src/samples. Register files and tests import from here.

Non-JSON --input values (the action still passes the script path) are ignored, so current CI keeps working.

Also

  • Every render:* npm script now calls the shared CLI with --template.
  • The render workflow points every row at scripts/render.ts.
  • Deleted the 15 scripts/render-*.ts copies, render-entry.ts, and src/samples/.
  • Tests in test/scripts/render-catalog.test.ts cover the catalog, args, and strategy order.

No local builds or tests were run.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@atherdon
atherdon merged commit 1812968 into main Oct 13, 2026
18 of 19 checks passed
@atherdon
atherdon deleted the feat/abstract-render-scripts branch October 13, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant