feat: add yarn typecheck and fix all types

This commit is contained in:
DecDuck
2025-04-05 09:40:05 +11:00
parent 2a85322f64
commit 82baeb909a
16 changed files with 37 additions and 117 deletions

View File

@ -27,7 +27,7 @@ export default defineEventHandler(async (h3) => {
take: parseInt(query.limit as string),
skip: parseInt(query.skip as string),
orderBy: orderBy,
tags: tags?.map((e) => e.toString()),
...(tags && { tags: tags.map((e) => e.toString()) }),
search: query.search as string,
};

View File

@ -41,7 +41,7 @@ export default defineEventHandler(async (h3) => {
tags: tags,
image: imageId,
...(imageId && { image: imageId }),
authorId: "system",
});

View File

@ -23,18 +23,9 @@ export default defineClientEventHandler(async (h3, {}) => {
const mappedVersions = versions
.map((version) => {
if (!version.dropletManifest) return undefined;
const manifest = JSON.parse(
version.dropletManifest.toString()
) as DropManifest;
/*
TODO: size estimates
They are a little complicated because of delta versions
Manifests need to be generated with the manifest generator and then
added up. I'm a little busy right now to implement this, though.
*/
const newVersion = { ...version, dropletManifest: undefined };
// @ts-expect-error
delete newVersion.dropletManifest;
return {
...newVersion,

View File

@ -23,18 +23,8 @@ export default defineClientEventHandler(async (h3, {}) => {
const mappedVersions = versions
.map((version) => {
if (!version.dropletManifest) return undefined;
const manifest = JSON.parse(
version.dropletManifest.toString()
) as DropManifest;
/*
TODO: size estimates
They are a little complicated because of delta versions
Manifests need to be generated with the manifest generator and then
added up. I'm a little busy right now to implement this, though.
*/
const newVersion = { ...version, dropletManifest: undefined };
// @ts-expect-error
delete newVersion.dropletManifest;
return {
...newVersion,

View File

@ -20,7 +20,7 @@ export default defineClientEventHandler(async (h3) => {
take: parseInt(query.limit as string),
skip: parseInt(query.skip as string),
orderBy: orderBy,
tags: tags?.map((e) => e.toString()),
...(tags && { tags: tags.map((e) => e.toString()) }),
search: query.search as string,
};

View File

@ -28,7 +28,7 @@ export default defineEventHandler(async (h3) => {
take: parseInt(query.limit as string),
skip: parseInt(query.skip as string),
orderBy: orderBy,
tags: tags?.map((e) => e.toString()),
...(tags && { tags: tags.map((e) => e.toString()) }),
search: query.search as string,
};