4 Commits

Author SHA1 Message Date
Oleks 0be268307e style: auto-format from pre-push hooks
ci/woodpecker/push/container Pipeline was successful
2026-06-14 14:25:22 +03:00
Oleks 0072716733 fix(seed): rename reserved 'status' field to 'parity_status'
ci/woodpecker/push/container Pipeline was canceled
emdash reserves 'status' as a built-in entry field (publish state), so
'emdash seed' rejected the plugins collection's custom 'status' select
with 'Field slug status is reserved' — leaving the catalog empty. Rename
the domain field slug to parity_status (label stays 'Migration status')
across the seed field def + 39 entries, the collections type, and all
plugin-data reads. The public ?status= URL filter param and StatusBadge
prop name are unchanged.
2026-06-14 14:25:15 +03:00
Oleks 9b1090b614 style: auto-format from pre-push hooks
ci/woodpecker/push/container Pipeline was successful
2026-06-14 14:06:48 +03:00
Oleks 87eb6a0f84 fix(seed): add required id to seed entries + make seed non-fatal
ci/woodpecker/push/container Pipeline was canceled
emdash seed validates that every content entry has an id (validate.ts),
but seed/seed.json entries only had slug — so seed aborted with 'id is
required' and, under set -e, crash-looped the pod (502). Set id=slug for
all 42 entries (conflict-detection keys off slug, so id is just the
seed-local ref key). Also move the seed step out from under set -e: a bad
content seed should log loudly but not take the whole site down (init
migrations stay fatal).
2026-06-14 14:06:41 +03:00
6 changed files with 567 additions and 102 deletions
+551 -95
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -7,7 +7,7 @@ interface Props {
data: {
title: string;
purpose?: string | null;
status?: string | null;
parity_status?: string | null;
source_cms?: string | null;
target_cms?: string | null;
};
@@ -19,7 +19,7 @@ const d = entry.data;
<li class="plugin-card">
<h3><a href={`/plugins/${entry.id}`}>{d.title}</a></h3>
<div class="meta">
<StatusBadge status={d.status} />
<StatusBadge status={d.parity_status} />
{d.source_cms && <span>{d.source_cms}{d.target_cms ? ` → ${d.target_cms}` : ""}</span>}
</div>
{d.purpose && <p>{d.purpose}</p>}
+1 -1
View File
@@ -28,7 +28,7 @@ declare module "emdash" {
source_cms: string;
target_cms?: string | null;
category?: string | null;
status: string;
parity_status: string;
source_repo_url?: string | null;
target_repo_url?: string | null;
notes?: import("emdash").PortableTextBlock[] | null;
+2 -2
View File
@@ -20,13 +20,13 @@ const statusFilter = url.searchParams.get("status") ?? "";
const sourceFilter = url.searchParams.get("source") ?? "";
const sources = Array.from(new Set(plugins.map((p) => p.data.source_cms).filter(Boolean))).sort();
const present = new Set(plugins.map((p) => p.data.status).filter(Boolean));
const present = new Set(plugins.map((p) => p.data.parity_status).filter(Boolean));
const statuses = STATUSES.filter((s) => present.has(s.value));
const filtered = plugins.filter((p) => {
const d = p.data;
if (q && !(`${d.title} ${d.purpose ?? ""}`.toLowerCase().includes(q))) return false;
if (statusFilter && d.status !== statusFilter) return false;
if (statusFilter && d.parity_status !== statusFilter) return false;
if (sourceFilter && d.source_cms !== sourceFilter) return false;
return true;
});
+1 -1
View File
@@ -50,7 +50,7 @@ const targetCmsSlug = resolveCmsSlug(d?.target_cms, cmsIndex);
</p>
<h1>{d.title}</h1>
<p class="meta">
<StatusBadge status={d.status} />
<StatusBadge status={d.parity_status} />
{d.source_cms && <span class="source-target">{d.source_cms}{d.target_cms ? ` → ${d.target_cms}` : ""}</span>}
</p>
{d.purpose && <p class="lead">{d.purpose}</p>}
+10 -1
View File
@@ -15,7 +15,16 @@ mkdir -p /app/state/uploads
# upgrades against an existing PVC and never recover a partial first-run init.)
echo "[entrypoint] running emdash init (applies pending migrations)"
node_modules/.bin/emdash init
# Seed is best-effort: unlike migrations, a content-seed failure (e.g. a bad
# seed.json entry) must NOT crash-loop the whole site, so it is NOT under the
# `set -e` abort. We still surface a non-zero rc loudly in the logs rather than
# swallowing it silently.
echo "[entrypoint] running emdash seed (applies seed/seed.json, onConflict=skip)"
node_modules/.bin/emdash seed
if node_modules/.bin/emdash seed; then
echo "[entrypoint] emdash seed ok"
else
echo "[entrypoint] WARNING: emdash seed failed (rc=$?) — serving without full seed" >&2
fi
exec "$@"