Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 20edeac3f8defb9b7e1401560aa697f9ef2df602
parent bcd1ef21054fec0f9f13600514e38c15ac7fb286
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon,  5 Oct 2026 02:39:55 -0400

common: a site's report ids use the report document's id rule — one definition

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/lib/siteSchema.ts | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/common/lib/siteSchema.ts b/common/lib/siteSchema.ts @@ -41,6 +41,7 @@ import { wordmarkLeadFor } from "./brand"; import { parseSocialLinks, type SocialLink } from "./settingsSchema"; import { settingsField } from "./settingsFieldSchemas"; import type { FieldDocs } from "./fieldDocs"; +import { REPORT_ID_RE, isReportId } from "./report/schema"; // Each field is documented in SITE_CHANNEL_MEMBERSHIP_FIELD_DOCS below. export type SiteChannelMembership = { @@ -108,11 +109,12 @@ export function isCitedSite(site: Pick<Site, "publish">): boolean { } // A report id: a lowercase slug, the directory name under -// `sites/<siteId>/reports/`. The same grammar as a site id. -export const REPORT_ID_RE = /^[a-z0-9][a-z0-9-]*$/; +// `sites/<siteId>/reports/`. The grammar is the report document's own +// (lib/report/schema.ts) — one definition. +export { REPORT_ID_RE }; export function isValidReportId(id: unknown): id is string { - return typeof id === "string" && REPORT_ID_RE.test(id); + return isReportId(id); } // Parse the published report list: valid ids, first occurrence kept, order