Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

651 B
Raw Blame
// Receipt-matching manifest metadata for navigation/state tests. Artifact byte
// verification and public-origin handshakes have separate transport coverage.
export function previewManifestResponse(preview) {
  const files=Array.from({length:preview.files},(_,index)=>({
    path:index?`assets/file-${index}.txt`:'index.html',
    bytes:index?1:preview.bytes-preview.files+1,
    sha256:index?'c'.repeat(64):preview.entrySha256,
  }))
  const body=JSON.stringify({schemaVersion:1,siteId:preview.siteId,sha256:preview.sha256,bytes:preview.bytes,files})
  return {ok:true,headers:new Map(),arrayBuffer:async()=>new TextEncoder().encode(body).buffer}
}