fix: 120 type errors
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m47s

This commit is contained in:
Max Richter
2025-11-24 00:10:38 +01:00
parent 0fa1b64d49
commit d64877666b
31 changed files with 584 additions and 467 deletions

View File

@@ -1,27 +1,36 @@
import type { RequestHandler } from "./$types";
import type { EntryGenerator, RequestHandler } from "./$types";
import * as registry from "$lib/node-registry";
import type { EntryGenerator } from "../$types";
export const prerender = true;
export const entries: EntryGenerator = async () => {
const users = await registry.getUsers();
return users.map(user => {
return user.collections.map(collection => {
return collection.nodes.map(node => {
return { user: user.id, collection: collection.id.split("/")[1], node: node.id.split("/")[2] }
return users
.map((user) => {
return user.collections.map((collection) => {
return collection.nodes.map((node) => {
return {
user: user.id,
collection: collection.id.split("/")[1],
node: node.id.split("/")[2],
};
});
});
})
}).flat(2);
}
.flat(2);
};
export const GET: RequestHandler = async function GET({ params }) {
const wasm = await registry.getWasm(`${params.user}/${params.collection}/${params.node}`);
const wasm = await registry.getWasm(
`${params.user}/${params.collection}/${params.node}`,
);
if (!wasm) {
return new Response("Not found", { status: 404 });
}
return new Response(wasm, { status: 200, headers: { "Content-Type": "application/wasm" } });
}
return new Response(wasm, {
status: 200,
headers: { "Content-Type": "application/wasm" },
});
};