refactor(domain): own digest and prefixed identifier shapes in one module (#547)

This commit is contained in:
morluto
2026-10-05 17:29:20 +08:00
committed by GitHub
parent 828395d510
commit ea58834940
56 changed files with 314 additions and 162 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import { z } from "zod";
import { browserCompletenessSchema } from "./browserCompleteness.js";
import { webTextArtifactSchema } from "./webContentArtifact.js";
import { jsonShapeSchema } from "./jsonShape.js";
import { prefixedDigestSchema } from "./../domain/digests.js";
const browserVersionSchema = z.object({
product: z.string(),
@@ -96,7 +97,7 @@ const browserScriptSchema = z.object({
source: browserScriptSourceSchema,
});
const browserResourceSchema = z.object({
resource_key: z.string().regex(/^res_[a-f0-9]{64}$/u),
resource_key: prefixedDigestSchema("res"),
url: z.string(),
origin: z.string().nullable(),
type: z.string(),