{"draft":null,"from":3,"to":318,"files":[{"path":"worker/project/init.ts","added":8,"removed":6,"diff":"--- a/worker/project/init.ts\n+++ b/worker/project/init.ts\n@@ -1,10 +1,10 @@\n // Create the project from its first files. Writes go through InitHost; today\n // the host is Project.\n \n-import { type AttrSet, buildBase, canonicalText, type View } from \"../../src/engine/index.ts\";\n+import { type AttrSet, buildBase, canonicalText, type ReadView } from \"../../src/engine/index.ts\";\n import { checkPath } from \"./path-rules.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { configProblem } from \"./project-helpers.ts\";\n+import { configProblem, PROJECT_FILES, projectFileOf } from \"./project-helpers.ts\";\n import type { Entry, Modes, ProjectOptions } from \"./project-types.ts\";\n import { clashInPaths } from \"./spelling.ts\";\n import { checkModes } from \"./view-changes.ts\";\n@@ -16,7 +16,7 @@\n \twholeOut(\n \t\tfiles: Readonly<Record<string, string | null>>,\n \t\tblobs: Readonly<Record<string, string>>,\n-\t\tview: View | undefined,\n+\t\tview: ReadView | undefined,\n \t\tconfig?: string,\n \t): { files: Record<string, string | null>; blobs: Record<string, string> };\n \tcheckBlobs(blobs: unknown, files: object): Record<string, string>;\n@@ -35,11 +35,13 @@\n \tif (typeof files !== \"object\" || files === null) throw new ProjectError(\"bad-request\", \"init needs {files}\");\n \tconst clash = clashInPaths([...new Set([...Object.keys(files), ...Object.keys(blobs)])].toSorted());\n \tif (clash) throw new ProjectError(\"bad-request\", `init: ${clash} (#49)`);\n-\tconst config = typeof files[\"avcs.json\"] === \"string\" ? configProblem(files[\"avcs.json\"]) : undefined;\n-\tif (config) throw new ProjectError(\"bad-request\", `init: avcs.json ${config}`);\n+\tfor (const name of PROJECT_FILES) {\n+\t\tconst config = typeof files[name] === \"string\" ? configProblem(files[name]) : undefined;\n+\t\tif (config) throw new ProjectError(\"bad-request\", `init: ${name} ${config}`);\n+\t}\n \tif (host.whole) {\n \t\t// The project file being created says which paths are whole (#46).\n-\t\tconst config = typeof files[\"avcs.json\"] === \"string\" ? files[\"avcs.json\"] : undefined;\n+\t\tconst config = projectFileOf(files)?.text;\n \t\t({ files, blobs } = host.wholeOut(files, blobs, undefined, config) as {\n \t\t\tfiles: Record<string, string>;\n \t\t\tblobs: Record<string, string>;"}],"unmatched":[]}