Implement OpenSpec artifacts and SDK contracts

This commit is contained in:
Anthony Ettinger 2026-06-06 16:44:58 +00:00
parent 1aa67367b8
commit 17942eef57
16 changed files with 486 additions and 21 deletions

View file

@ -18,7 +18,8 @@ const mimeTypes = {
".json": "application/json; charset=utf-8",
".png": "image/png",
".svg": "image/svg+xml",
".webmanifest": "application/manifest+json; charset=utf-8"
".webmanifest": "application/manifest+json; charset=utf-8",
".xml": "application/xml; charset=utf-8"
};
createServer((request, response) => {
@ -76,7 +77,7 @@ function sendFile(file, headOnly, response) {
const extension = extname(file);
response.writeHead(200, {
"cache-control": extension === ".html" ? "no-store" : "public, max-age=31536000, immutable",
"cache-control": extension === ".html" || extension === ".xml" ? "no-store" : "public, max-age=31536000, immutable",
"content-type": mimeTypes[extension] ?? "application/octet-stream"
});