Skip to content

cli: fix newsletter final-render 'rewritePreviewUrls is not defined' - #481

Merged
alexeygrigorev merged 2 commits into
mainfrom
fix/newsletter-final-render-cli
Nov 18, 2026
Merged

alexeygrigorev merged 2 commits into
mainfrom
fix/newsletter-final-render-cli

Conversation

@alexeygrigorev

Copy link
Copy Markdown
Member

dataops newsletter final-render failed on every call with error: rewritePreviewUrls is not defined: the command called a helper that does not exist. It now uses the existing normalizeMarkdownPayloadUrls.

Also fixed:

  • --html-file referenced an unimported fs namespace and would also have crashed.
  • dataops newsletter show now prints the stored final render (web view URL, Relay key, subject, preview, html snapshot size, last update).

Tests: cli/test/newsletter-final-render.test.mjs covers the exact Weekly #303 command, --html-file, --clear, the usage error, and the show output.

Intake 9ca2e415-12bf-45b0-a916-86cc5e64342f

…nd show the final render

final-render called an undefined rewritePreviewUrls helper, so every run
failed with 'rewritePreviewUrls is not defined'. Use the existing
normalizeMarkdownPayloadUrls. --html-file also referenced an unimported
fs namespace. newsletter show now prints the stored Final render web view,
subject and preview.

Intake 9ca2e415-12bf-45b0-a916-86cc5e64342f
The calendar slots tests use fixed 2026-11-16..24 fixtures and the CLI drops
dates before today, so they started failing on 2026-11-18. calendar.mjs now
uses berlinToday() (which honours DATAOPS_TODAY) and the test pins the date.
@alexeygrigorev
alexeygrigorev merged commit 39afe8a into main Nov 18, 2026
1 check passed
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