-
Results
-
-
+ <>
+
+
+
+
+
Results
+
+
+
-
-
-
-
-
- | Converted File Name |
- Status |
- View |
- Download |
-
-
-
- {files.map((file) => (
- // biome-ignore lint/correctness/useJsxKeyInIterable:
+
+
+
- | {file.output_file_name} |
- {file.status} |
-
-
- View
-
- |
-
-
- Download
-
- |
+ Converted File Name |
+ Status |
+ View |
+ Download |
- ))}
-
-
-
-
-
+
+
+ {files.map((file) => (
+ // biome-ignore lint/correctness/useJsxKeyInIterable:
+
+ | {file.output_file_name} |
+ {file.status} |
+
+
+ View
+
+ |
+
+
+ Download
+
+ |
+
+ ))}
+
+
+
+
+
+ >
);
},
@@ -864,9 +891,10 @@ const app = new Elysia({
return redirect("/login", 302);
}
- const job = (await db
+ const job = await db
.query("SELECT * FROM jobs WHERE user_id = ? AND id = ?")
- .get(user.id, params.jobId)) as IJobs;
+ .as(Jobs)
+ .get(user.id, params.jobId);
if (!job) {
set.status = 404;
@@ -879,7 +907,8 @@ const app = new Elysia({
const files = db
.query("SELECT * FROM file_names WHERE job_id = ?")
- .all(params.jobId) as IFileNames[];
+ .as(Filename)
+ .all(params.jobId);
return (
@@ -975,50 +1004,54 @@ const app = new Elysia({
return (
-
-
-
- Converters
-
-
-
- | Converter |
- From (Count) |
- To (Count) |
-
-
-
- {Object.entries(getAllTargets()).map(([converter, targets]) => {
- const inputs = getAllInputs(converter);
- return (
- // biome-ignore lint/correctness/useJsxKeyInIterable:
-
- | {converter} |
-
- Count: {inputs.length}
-
- {inputs.map((input) => (
- // biome-ignore lint/correctness/useJsxKeyInIterable:
- - {input}
- ))}
-
- |
-
- Count: {targets.length}
-
- {targets.map((target) => (
- // biome-ignore lint/correctness/useJsxKeyInIterable:
- - {target}
- ))}
-
- |
-
- );
- })}
-
-
-
-
+ <>
+
+
+
+ Converters
+
+
+
+ | Converter |
+ From (Count) |
+ To (Count) |
+
+
+
+ {Object.entries(getAllTargets()).map(
+ ([converter, targets]) => {
+ const inputs = getAllInputs(converter);
+ return (
+ // biome-ignore lint/correctness/useJsxKeyInIterable:
+
+ | {converter} |
+
+ Count: {inputs.length}
+
+ {inputs.map((input) => (
+ // biome-ignore lint/correctness/useJsxKeyInIterable:
+ - {input}
+ ))}
+
+ |
+
+ Count: {targets.length}
+
+ {targets.map((target) => (
+ // biome-ignore lint/correctness/useJsxKeyInIterable:
+ - {target}
+ ))}
+
+ |
+
+ );
+ },
+ )}
+
+
+
+
+ >
);
})
@@ -1065,7 +1098,8 @@ const clearJobs = () => {
// get all files older than 24 hours
const jobs = db
.query("SELECT * FROM jobs WHERE date_created < ?")
- .all(new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString()) as IJobs[];
+ .as(Jobs)
+ .all(new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString());
for (const job of jobs) {
// delete the directories
diff --git a/tsconfig.json b/tsconfig.json
index 86be340..6547452 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -17,9 +17,6 @@
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"allowJs": true,
- "types": [
- "bun-types" // add Bun global
- ],
// non bun init
"plugins": [{ "name": "@kitajs/ts-html-plugin" }],
"noUncheckedIndexedAccess": true,