Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
wisp.place
1import type { Record, Directory } from "@wisp/lexicons/types/place/wisp/fs";
2// import { validateRecord } from "@wisp/lexicons/types/place/wisp/fs";
3
4/**
5 * Create the manifest record for a site
6 */
7export function createManifest(
8 siteName: string,
9 root: Directory,
10 fileCount: number
11): Record {
12 const manifest = {
13 $type: 'place.wisp.fs' as const,
14 site: siteName,
15 root,
16 fileCount,
17 createdAt: new Date().toISOString()
18 };
19
20 // Validate the manifest before returning
21 // const validationResult = validateRecord(manifest);
22 // if (!validationResult.success) {
23 // throw new Error(`Invalid manifest: ${validationResult.error?.message || 'Validation failed'}`);
24 // }
25
26 return manifest;
27}