feat(recipe-umami): productized umami-site CLI recipe - #192
Merged
Conversation
Pins the expected behaviour: - renderUmamiManifest produces valid parseSamohostToml output (ok=true) - dbBackend/previewDbBackend both "none", no releaseTagPattern - healthUrl ends with /api/heartbeat, buildCmd is /usr/bin/true - two distinct slugs yield distinct name/serviceUnit/healthUrl/mainHost - CLI "recipe umami-site" parses to kind="recipe-umami-site" with all flags - --umami-ref defaults to "v3" when omitted - missing required flags throw UsageError All 25 tests fail because src/commands/recipe-umami.ts does not exist yet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces four files: - templates/recipes/umami/umami-site.samohost.toml.tmpl: parameterized manifest with buildCmd=/usr/bin/true (off-VM prebuilt artifact pattern), dbBackend/previewDbBackend=none, healthUrl ending in /api/heartbeat, mainListen=cp-http80; no releaseTagPattern (upstream v2.x/v3.x tags do not match samohost date grammar). - src/commands/recipe-umami.ts: renderUmamiManifest + runRecipeUmamiSite; delegates registration to existing runAppRegisterFromToml (no new infra code); prints operator next-steps including the APP_SECRET step (distinct from COOKIE_SECRET) and admin password change reminder. - src/cli.ts: wires "recipe umami-site" as a first-class subcommand with ParsedRecipeUmamiSite interface, parseRecipeUmamiSite parser, and dispatch case; --umami-ref defaults to "v3". - docs/recipes/umami-per-site.md: operator runbook covering off-VM artifact build requirement, APP_SECRET vs COOKIE_SECRET distinction, PG18/Prisma compatibility note, and merge-gate reminder. All 26 new tests pass (RED c23d9bf → GREEN); pre-existing pg.test.ts failure (PG_TEST_URL not set) is unrelated and pre-dates this MR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
samohost recipe umami-siteas a first-class CLI subcommand that onboards Umami analytics as a samohost NODE APP per client site.samohost.tomlmanifest via a parameterized template (buildCmd=/usr/bin/true for off-VM prebuilt artifact, dbBackend/previewDbBackend=none, healthUrl ending in /api/heartbeat, no releaseTagPattern)runAppRegisterFromToml— zero new infra codedocs/recipes/umami-per-site.mdcovers off-VM artifact build requirement, PG18/Prisma compatibility note, and merge-gateRoot-cause note (fix-dishonest-state-not-symptoms)
No state bug — this is a net-new feature. The design deliberately excludes
releaseTagPatternbecause upstream Umami tags (v2.x/v3.x) do not match samohost'svYYYYMMDD.Ndate grammar; the manifest pins viabranchinstead.Test evidence (Red → Green)
RED commit:
c23d9bf— test/recipe-umami.test.ts imported a non-existent module; 0 pass, 1 error.GREEN commit:
c70cbb8— all 26 new tests pass; full suite: 2352 pass, 1 fail (pre-existingpackages/auth/test/pg.test.ts— requiresPG_TEST_URL, unrelated to this MR).TypeScript typecheck:
bunx tsc --noEmitexits 0, no errors.Files changed
templates/recipes/umami/umami-site.samohost.toml.tmplsrc/commands/recipe-umami.tssrc/cli.tsdocs/recipes/umami-per-site.mdtest/recipe-umami.test.tsGate (DO NOT MERGE)
🤖 Generated with Claude Code