73 Commits

Author SHA1 Message Date
Emrik Östling
8674557e42 Merge pull request #90 from C4illin/release-please--branches--main--components--convertx-frontend 2024-07-30 19:07:14 +02:00
C4illin
87052ce105 chore: create data directory 2024-07-30 19:03:13 +02:00
Emrik Östling
98ee26f6e2 chore(main): release 0.3.3 2024-07-30 18:50:10 +02:00
C4illin
96e2c88465 build(deps): update @elysiajs/static dependency to version 1.0.3 2024-07-30 18:49:33 +02:00
C4illin
d55ba218ff chore: add linux/arm64 platform to Docker build 2024-07-30 00:50:30 +02:00
C4illin
ae2455e73e chore: fix type errors and update bun sql syntax 2024-07-30 00:48:15 +02:00
C4illin
b9fe32053c chore: Update npm dependencies and add linting scripts 2024-07-30 00:47:46 +02:00
C4illin
5cf3d74e03 chore: update old config 2024-07-30 00:44:43 +02:00
C4illin
2b92778f37 chore: lock Dockerfile base image to specific version 2024-07-29 23:03:46 +02:00
C4illin
27d4da8941 chore: add TypeScript settings 2024-07-29 23:03:24 +02:00
Emrik Östling
2384e22c22 Merge pull request #94 from C4illin/dependabot/npm_and_yarn/types/node-22.0.0
build(deps-dev): bump @types/node from 20.14.13 to 22.0.0
2024-07-29 11:05:17 +02:00
dependabot[bot]
6690caeb1e build(deps-dev): bump @types/node from 20.14.13 to 22.0.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.13 to 22.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 08:29:07 +00:00
C4illin
c714ade3e2 fix: downgrade @elysiajs/html dependency to version 1.0.2
Error 500 with version 0.3.2 #81
2024-07-24 19:03:19 +02:00
Emrik Östling
e9e95c61e9 Merge pull request #87 from C4illin/dependabot/npm_and_yarn/kitajs/ts-html-plugin-tw-4.0.2
build(deps-dev): update @kitajs/ts-html-plugin requirement from ^4.0.1 to ^4.0.2
2024-07-24 12:08:50 +02:00
dependabot[bot]
b1e0e68d9c build(deps-dev): update @kitajs/ts-html-plugin requirement
Updates the requirements on [@kitajs/ts-html-plugin](https://github.com/kitajs/html/tree/HEAD/packages/ts-html-plugin) to permit the latest version.
- [Release notes](https://github.com/kitajs/html/releases)
- [Changelog](https://github.com/kitajs/html/blob/master/packages/ts-html-plugin/CHANGELOG.md)
- [Commits](https://github.com/kitajs/html/commits/@kitajs/ts-html-plugin@4.0.2/packages/ts-html-plugin)

---
updated-dependencies:
- dependency-name: "@kitajs/ts-html-plugin"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 10:02:32 +00:00
Emrik Östling
5ce3706550 Merge pull request #89 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.12
build(deps-dev): update @types/node requirement from ^20.14.11 to ^20.14.12
2024-07-24 12:01:01 +02:00
dependabot[bot]
57e47e95c0 build(deps-dev): update @types/node requirement
---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 09:51:52 +00:00
Emrik Östling
6d6bc6cfdd Merge pull request #88 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.1.4
build(deps): update elysia requirement from ^1.1.3 to ^1.1.4
2024-07-24 11:50:22 +02:00
dependabot[bot]
b44eb22e77 build(deps): update elysia requirement from ^1.1.3 to ^1.1.4
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 09:08:27 +00:00
Emrik Östling
6edfbaa27d Merge pull request #84 from C4illin/dependabot/npm_and_yarn/types/eslint-9.6.0
build(deps-dev): bump @types/eslint from 8.56.11 to 9.6.0
2024-07-23 20:51:20 +02:00
dependabot[bot]
d669baeff4 build(deps-dev): bump @types/eslint from 8.56.11 to 9.6.0
Bumps [@types/eslint](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint) from 8.56.11 to 9.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint)

---
updated-dependencies:
- dependency-name: "@types/eslint"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 15:18:33 +00:00
Emrik Östling
ec1a7bc015 Merge pull request #86 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.17.0
build(deps-dev): update @typescript-eslint/parser requirement from ^7.16.1 to ^7.17.0
2024-07-23 17:17:50 +02:00
dependabot[bot]
0805241a19 build(deps-dev): update @typescript-eslint/parser requirement
Updates the requirements on [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.17.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 15:17:42 +00:00
Emrik Östling
83f041daa2 Merge pull request #83 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.17.0
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.16.1 to ^7.17.0
2024-07-23 17:16:55 +02:00
dependabot[bot]
55331a4496 build(deps-dev): update @typescript-eslint/eslint-plugin requirement
Updates the requirements on [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.17.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 15:16:44 +00:00
Emrik Östling
b53f07e7a7 Merge pull request #85 from C4illin/dependabot/npm_and_yarn/typescript-tw-5.5.4
build(deps-dev): update typescript requirement from ^5.5.3 to ^5.5.4
2024-07-23 17:15:12 +02:00
dependabot[bot]
0eb89ae712 build(deps-dev): update typescript requirement from ^5.5.3 to ^5.5.4
Updates the requirements on [typescript](https://github.com/Microsoft/TypeScript) to permit the latest version.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 09:00:50 +00:00
Emrik Östling
7dd153b02c Merge pull request #80 from C4illin/dependabot/npm_and_yarn/eslint-plugin-prettier-tw-5.2.1
build(deps-dev): update eslint-plugin-prettier requirement from ^5.1.3 to ^5.2.1
2024-07-19 19:46:55 +02:00
dependabot[bot]
6ccafeb3b0 build(deps-dev): update eslint-plugin-prettier requirement
Updates the requirements on [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) to permit the latest version.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 16:51:07 +00:00
Emrik Östling
b703903b22 Merge pull request #74 from C4illin/dependabot/npm_and_yarn/elysiajs/html-tw-1.1.0
build(deps): update @elysiajs/html requirement from ^1.0.2 to ^1.1.0
2024-07-19 18:49:30 +02:00
dependabot[bot]
9e66eab0a2 build(deps): update @elysiajs/html requirement from ^1.0.2 to ^1.1.0
---
updated-dependencies:
- dependency-name: "@elysiajs/html"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 13:42:52 +00:00
Emrik Östling
b272bf9504 Merge pull request #76 from C4illin/dependabot/npm_and_yarn/elysiajs/jwt-tw-1.1.0
build(deps): update @elysiajs/jwt requirement from ^1.0.2 to ^1.1.0
2024-07-19 15:41:20 +02:00
dependabot[bot]
56632f3500 build(deps): update @elysiajs/jwt requirement from ^1.0.2 to ^1.1.0
---
updated-dependencies:
- dependency-name: "@elysiajs/jwt"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 10:05:14 +00:00
Emrik Östling
2d9d8f8b4f Merge pull request #79 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.1.3
build(deps): update elysia requirement from ^1.1.2 to ^1.1.3
2024-07-19 12:03:43 +02:00
dependabot[bot]
65d4e0fbbe build(deps): update elysia requirement from ^1.1.2 to ^1.1.3
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 10:02:43 +00:00
Emrik Östling
8182d12ea0 Merge pull request #72 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.16.1
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.16.0 to ^7.16.1
2024-07-19 12:01:11 +02:00
dependabot[bot]
1c241d4cad build(deps-dev): update @typescript-eslint/eslint-plugin requirement
Updates the requirements on [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 09:56:52 +00:00
Emrik Östling
874ff6ee00 Merge pull request #75 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.11
build(deps-dev): update @types/node requirement from ^20.14.10 to ^20.14.11
2024-07-17 11:55:23 +02:00
dependabot[bot]
e9f1219ad9 build(deps-dev): update @types/node requirement
---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 09:15:56 +00:00
Emrik Östling
4811452aec Merge pull request #77 from C4illin/dependabot/npm_and_yarn/elysiajs/static-tw-1.1.0
build(deps): update @elysiajs/static requirement from ^1.0.3 to ^1.1.0
2024-07-17 11:14:29 +02:00
dependabot[bot]
382ebad35a build(deps): update @elysiajs/static requirement from ^1.0.3 to ^1.1.0
---
updated-dependencies:
- dependency-name: "@elysiajs/static"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 09:12:35 +00:00
Emrik Östling
85945256e7 Merge pull request #78 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.1.2
build(deps): update elysia requirement from ^1.0.27 to ^1.1.2
2024-07-17 11:11:18 +02:00
dependabot[bot]
c504692569 build(deps): update elysia requirement from ^1.0.27 to ^1.1.2
Updates the requirements on [elysia](https://github.com/elysiajs/elysia) to permit the latest version.
- [Release notes](https://github.com/elysiajs/elysia/releases)
- [Changelog](https://github.com/elysiajs/elysia/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elysiajs/elysia/commits)

---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 08:54:51 +00:00
Emrik Östling
64a16036be Merge pull request #73 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.16.1
build(deps-dev): update @typescript-eslint/parser requirement from ^7.16.0 to ^7.16.1
2024-07-16 11:52:15 +02:00
dependabot[bot]
b9f038386f build(deps-dev): update @typescript-eslint/parser requirement
Updates the requirements on [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-16 08:53:35 +00:00
Emrik Östling
945775e52b Merge pull request #71 from C4illin/dependabot/npm_and_yarn/types/ws-tw-8.5.11
build(deps-dev): update @types/ws requirement from ^8.5.10 to ^8.5.11
2024-07-15 15:32:42 +02:00
dependabot[bot]
e7f3466736 build(deps-dev): update @types/ws requirement from ^8.5.10 to ^8.5.11
---
updated-dependencies:
- dependency-name: "@types/ws"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 12:47:06 +00:00
Emrik Östling
ee80eeb18d Merge pull request #69 from C4illin/dependabot/npm_and_yarn/ianvs/prettier-plugin-sort-imports-tw-4.3.1
build(deps-dev): update @ianvs/prettier-plugin-sort-imports requirement from ^4.3.0 to ^4.3.1
2024-07-15 14:45:33 +02:00
dependabot[bot]
34c7e0bd25 build(deps-dev): update @ianvs/prettier-plugin-sort-imports requirement
Updates the requirements on [@ianvs/prettier-plugin-sort-imports](https://github.com/ianvs/prettier-plugin-sort-imports) to permit the latest version.
- [Release notes](https://github.com/ianvs/prettier-plugin-sort-imports/releases)
- [Changelog](https://github.com/IanVS/prettier-plugin-sort-imports/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ianvs/prettier-plugin-sort-imports/compare/v4.3.0...v4.3.1)

---
updated-dependencies:
- dependency-name: "@ianvs/prettier-plugin-sort-imports"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 12:12:18 +00:00
Emrik Östling
492dbd5617 Merge pull request #70 from C4illin/dependabot/npm_and_yarn/prettier-tw-3.3.3
build(deps-dev): update prettier requirement from ^3.3.2 to ^3.3.3
2024-07-15 14:10:46 +02:00
dependabot[bot]
0935bf66ce build(deps-dev): update prettier requirement from ^3.3.2 to ^3.3.3
Updates the requirements on [prettier](https://github.com/prettier/prettier) to permit the latest version.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 09:10:38 +00:00
Emrik Östling
7389e0a059 Merge pull request #68 from C4illin/release-please--branches--main--components--convertx-frontend 2024-07-09 20:31:46 +02:00
Emrik Östling
c512b45f91 chore(main): release 0.3.2 2024-07-09 20:27:52 +02:00
C4illin
3ae2db5d9b fix: increase max request body to support large uploads
issue #64
2024-07-09 20:26:48 +02:00
Emrik Östling
0945b40a9c Merge pull request #67 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.16.0
build(deps-dev): update @typescript-eslint/parser requirement from ^7.15.0 to ^7.16.0
2024-07-09 11:31:38 +02:00
dependabot[bot]
20b958e547 build(deps-dev): update @typescript-eslint/parser requirement
Updates the requirements on [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-09 09:18:34 +00:00
Emrik Östling
e7e146c6c9 Merge pull request #66 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.16.0
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.15.0 to ^7.16.0
2024-07-09 11:16:59 +02:00
dependabot[bot]
005ad2d66b build(deps-dev): update @typescript-eslint/eslint-plugin requirement
Updates the requirements on [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-09 08:15:05 +00:00
Emrik Östling
e5c3a8acc4 Merge pull request #65 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.10
build(deps-dev): update @types/node requirement from ^20.14.9 to ^20.14.10
2024-07-08 10:16:29 +02:00
dependabot[bot]
87ecbabd1f build(deps-dev): update @types/node requirement
---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 08:12:13 +00:00
Emrik Östling
991c4e4ba8 Merge pull request #63 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.0.27
build(deps): update elysia requirement from ^1.0.26 to ^1.0.27
2024-07-03 13:41:16 +02:00
dependabot[bot]
87ccd8b44c build(deps): update elysia requirement from ^1.0.26 to ^1.0.27
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 08:45:48 +00:00
Emrik Östling
83e6699ca6 chore: update README.md 2024-07-03 00:31:54 +02:00
Emrik Östling
c91523c038 Merge pull request #61 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.15.0
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.14.1 to ^7.15.0
2024-07-02 11:17:19 +02:00
dependabot[bot]
1f73f036b2 build(deps-dev): update @typescript-eslint/eslint-plugin requirement
Updates the requirements on [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 09:12:46 +00:00
Emrik Östling
1223fabfca Merge pull request #62 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.15.0
build(deps-dev): update @typescript-eslint/parser requirement from ^7.14.1 to ^7.15.0
2024-07-02 11:10:32 +02:00
dependabot[bot]
8a42a39e69 build(deps-dev): update @typescript-eslint/parser requirement
Updates the requirements on [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) to permit the latest version.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 09:09:12 +00:00
Emrik Östling
22023bad25 Merge pull request #60 from C4illin/dependabot/npm_and_yarn/typescript-tw-5.5.3
build(deps-dev): update typescript requirement from ^5.5.2 to ^5.5.3
2024-07-02 11:04:04 +02:00
dependabot[bot]
db2f2d8f0a build(deps-dev): update typescript requirement from ^5.5.2 to ^5.5.3
Updates the requirements on [typescript](https://github.com/Microsoft/TypeScript) to permit the latest version.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 09:02:37 +00:00
Emrik Östling
d0fa9ac408 Merge pull request #59 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.0.26
build(deps): update elysia requirement from ^1.0.25 to ^1.0.26
2024-07-01 13:47:44 +02:00
dependabot[bot]
776a97289b build(deps): update elysia requirement from ^1.0.25 to ^1.0.26
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 08:35:55 +00:00
Emrik Östling
95340dd0eb Merge pull request #58 from C4illin/dependabot/npm_and_yarn/biomejs/biome-1.8.3
build(deps-dev): bump @biomejs/biome from 1.8.2 to 1.8.3
2024-06-28 13:29:20 +02:00
dependabot[bot]
7dcd74cc5f build(deps-dev): bump @biomejs/biome from 1.8.2 to 1.8.3
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/cli/v1.8.3/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-28 08:25:31 +00:00
17 changed files with 379 additions and 430 deletions

View File

@@ -12,17 +12,11 @@ const config = {
ecmaVersion: "latest",
sourceType: "module",
tsconfigRootDir: __dirname,
project: [
"./tsconfig.json",
"./cli/tsconfig.eslint.json", // separate eslint config for the CLI since we want to lint and typecheck differently due to template files
"./upgrade/tsconfig.json",
"./www/tsconfig.json",
],
project: ["./tsconfig.json"],
},
overrides: [
// Template files don't have reliable type information
{
files: ["./cli/template/**/*.{ts,tsx}"],
extends: ["plugin:@typescript-eslint/disable-type-checked"],
},
],
@@ -46,9 +40,6 @@ const config = {
// These lint rules don't make sense for us but are enabled in the preset configs
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/restrict-template-expressions": "off",
// This rule doesn't seem to be working properly
"@typescript-eslint/prefer-nullish-coalescing": "off",
},
};

View File

@@ -61,6 +61,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

1
.gitignore vendored
View File

@@ -47,3 +47,4 @@ package-lock.json
/db
/data
/Bruno
/tsconfig.tsbuildinfo

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}

View File

@@ -1,5 +1,19 @@
# Changelog
## [0.3.3](https://github.com/C4illin/ConvertX/compare/v0.3.2...v0.3.3) (2024-07-30)
### Bug Fixes
* downgrade @elysiajs/html dependency to version 1.0.2 ([c714ade](https://github.com/C4illin/ConvertX/commit/c714ade3e23865ba6cfaf76c9e7259df1cda222c))
## [0.3.2](https://github.com/C4illin/ConvertX/compare/v0.3.1...v0.3.2) (2024-07-09)
### Bug Fixes
* increase max request body to support large uploads ([3ae2db5](https://github.com/C4illin/ConvertX/commit/3ae2db5d9b36fe3dcd4372ddcd32aa573ea59aa6)), closes [#64](https://github.com/C4illin/ConvertX/issues/64)
## [0.3.1](https://github.com/C4illin/ConvertX/compare/v0.3.0...v0.3.1) (2024-06-27)

View File

@@ -1,4 +1,4 @@
FROM oven/bun:1-alpine as base
FROM oven/bun:1.1.21-alpine as base
WORKDIR /app
# install dependencies into temp directory

View File

@@ -28,6 +28,8 @@ A self-hosted online file converter. Supports 831 different formats. Written wit
<!-- many ffmpeg fileformats are duplicates -->
Any missing converter? Open an issue or pull request!
## Deployment
```yml

BIN
bun.lockb

Binary file not shown.

View File

@@ -1,40 +1,48 @@
{
"name": "convertx-frontend",
"version": "0.3.1",
"version": "0.3.3",
"scripts": {
"dev": "bun run --watch src/index.tsx",
"hot": "bun run --hot src/index.tsx",
"format": "biome format --write ./src",
"css": "cpy 'node_modules/@picocss/pico/css/pico.lime.min.css' 'src/public/' --flat"
"css": "cpy 'node_modules/@picocss/pico/css/pico.lime.min.css' 'src/public/' --flat",
"lint": "run-p 'lint:*'",
"lint:tsc": "tsc --noEmit",
"lint:knip": "knip"
},
"dependencies": {
"@elysiajs/cookie": "^0.8.0",
"@elysiajs/html": "^1.0.2",
"@elysiajs/jwt": "^1.0.2",
"@elysiajs/static": "^1.0.3",
"elysia": "^1.0.25"
"@elysiajs/html": "1.0.2",
"@elysiajs/jwt": "^1.1.0",
"@elysiajs/static": "1.0.3",
"elysia": "^1.1.4"
},
"module": "src/index.tsx",
"type": "module",
"bun-create": {
"start": "bun run src/index.tsx"
},
"devDependencies": {
"@biomejs/biome": "1.8.2",
"@ianvs/prettier-plugin-sort-imports": "^4.3.0",
"@kitajs/ts-html-plugin": "^4.0.1",
"@biomejs/biome": "1.8.3",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@kitajs/ts-html-plugin": "^4.0.2",
"@picocss/pico": "^2.0.6",
"@total-typescript/ts-reset": "^0.5.1",
"@types/bun": "^1.1.6",
"@types/eslint": "^8.56.10",
"@types/node": "^20.14.9",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@types/eslint": "^9.6.0",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"cpy-cli": "^5.0.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.3.2",
"typescript": "^5.5.2"
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-isaacscript": "^3.12.2",
"eslint-plugin-prettier": "^5.2.1",
"knip": "^5.27.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"typescript": "^5.5.4"
},
"trustedDependencies": [
"@biomejs/biome"

View File

@@ -1,4 +1,7 @@
export const BaseHtml = ({ children, title = "ConvertX" }) => (
export const BaseHtml = ({
children,
title = "ConvertX",
}: { children: JSX.Element; title?: string }) => (
<html lang="en">
<head>
<meta charset="UTF-8" />

View File

@@ -30,7 +30,7 @@ export const Header = ({
}
return (
<header className="container">
<header class="container">
<nav>
<ul>
<li>

View File

@@ -260,6 +260,7 @@ export const properties = {
"mpegts",
"mpegtsraw",
"mpegvideo",
"mpg",
"mpjpeg",
"mpl2",
"mpo",

View File

@@ -201,7 +201,7 @@ for (const converterName in properties) {
}
possibleInputs.sort();
export const getPossibleInputs = () => {
const getPossibleInputs = () => {
return possibleInputs;
};

View File

@@ -1,119 +0,0 @@
import sharp from "sharp";
import type { FormatEnum } from "sharp";
// declare possible conversions
export const properties = {
from: {
images: [
"avif",
"bif",
"csv",
"exr",
"fits",
"gif",
"hdr.gz",
"hdr",
"heic",
"heif",
"img.gz",
"img",
"j2c",
"j2k",
"jp2",
"jpeg",
"jpx",
"jxl",
"mat",
"mrxs",
"ndpi",
"nia.gz",
"nia",
"nii.gz",
"nii",
"pdf",
"pfm",
"pgm",
"pic",
"png",
"ppm",
"raw",
"scn",
"svg",
"svs",
"svslide",
"szi",
"tif",
"tiff",
"v",
"vips",
"vms",
"vmu",
"webp",
"zip",
],
},
to: {
images: [
"avif",
"dzi",
"fits",
"gif",
"hdr.gz",
"heic",
"heif",
"img.gz",
"j2c",
"j2k",
"jp2",
"jpeg",
"jpx",
"jxl",
"mat",
"nia.gz",
"nia",
"nii.gz",
"nii",
"png",
"tiff",
"vips",
"webp",
],
},
options: {
svg: {
scale: {
description: "Scale the image up or down",
type: "number",
default: 1,
},
},
},
};
export async function convert(
filePath: string,
fileType: string,
convertTo: keyof FormatEnum,
targetPath: string,
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
options?: any,
) {
if (fileType === "svg") {
const scale = options.scale || 1;
const metadata = await sharp(filePath).metadata();
if (!metadata || !metadata.width || !metadata.height) {
throw new Error("Could not get metadata from image");
}
const newWidth = Math.round(metadata.width * scale);
const newHeight = Math.round(metadata.height * scale);
return await sharp(filePath)
.resize(newWidth, newHeight)
.toFormat(convertTo)
.toFile(targetPath);
}
return await sharp(filePath).toFormat(convertTo).toFile(targetPath);
}

View File

@@ -72,4 +72,14 @@ if (process.env.NODE_ENV === "production") {
console.log(stdout.split("\n")[0]);
}
});
exec("bun -v", (error, stdout) => {
if (error) {
console.error("Bun is not installed. wait what");
}
if (stdout) {
console.log(`Bun v${stdout.split("\n")[0]}`);
}
});
}

View File

@@ -21,9 +21,7 @@ import {
} from "./helpers/normalizeFiletype";
import "./helpers/printVersions";
mkdir("./data", { recursive: true }).catch(console.error);
const db = new Database("./data/mydb.sqlite", { create: true });
const uploadsDir = "./data/uploads/";
const outputDir = "./data/output/";
@@ -78,33 +76,37 @@ if (dbVersion === 0) {
let FIRST_RUN = db.query("SELECT * FROM users").get() === null || false;
interface IUser {
id: number;
email: string;
password: string;
class User {
id!: number;
email!: string;
password!: string;
}
interface IFileNames {
id: number;
job_id: number;
file_name: string;
output_file_name: string;
status: string;
class Filename {
id!: number;
job_id!: number;
file_name!: string;
output_file_name!: string;
status!: string;
}
interface IJobs {
finished_files: number;
id: number;
user_id: number;
date_created: string;
status: string;
num_files: number;
class Jobs {
finished_files!: number;
id!: number;
user_id!: number;
date_created!: string;
status!: string;
num_files!: number;
}
// enable WAL mode
db.exec("PRAGMA journal_mode = WAL;");
const app = new Elysia()
const app = new Elysia({
serve: {
maxRequestBodySize: Number.MAX_SAFE_INTEGER,
},
})
.use(cookie())
.use(html())
.use(
@@ -173,36 +175,38 @@ const app = new Elysia()
return (
<BaseHtml title="ConvertX | Register">
<Header accountRegistration={ACCOUNT_REGISTRATION} />
<main class="container">
<article>
<form method="post">
<fieldset>
<label>
Email
<input
type="email"
name="email"
placeholder="Email"
autocomplete="email"
required
/>
</label>
<label>
Password
<input
type="password"
name="password"
placeholder="Password"
autocomplete="new-password"
required
/>
</label>
</fieldset>
<input type="submit" value="Register" />
</form>
</article>
</main>
<>
<Header accountRegistration={ACCOUNT_REGISTRATION} />
<main class="container">
<article>
<form method="post">
<fieldset>
<label>
Email
<input
type="email"
name="email"
placeholder="Email"
autocomplete="email"
required
/>
</label>
<label>
Password
<input
type="password"
name="password"
placeholder="Password"
autocomplete="new-password"
required
/>
</label>
</fieldset>
<input type="submit" value="Register" />
</form>
</article>
</main>
</>
</BaseHtml>
);
})
@@ -233,9 +237,17 @@ const app = new Elysia()
savedPassword,
);
const user = (await db
const user = db
.query("SELECT * FROM users WHERE email = ?")
.get(body.email)) as IUser;
.as(User)
.get(body.email);
if (!user) {
set.status = 500;
return {
message: "Failed to create user.",
};
}
const accessToken = await jwt.sign({
id: String(user.id),
@@ -279,52 +291,55 @@ const app = new Elysia()
return (
<BaseHtml title="ConvertX | Login">
<Header accountRegistration={ACCOUNT_REGISTRATION} />
<main class="container">
<article>
<form method="post">
<fieldset>
<label>
Email
<input
type="email"
name="email"
placeholder="Email"
autocomplete="email"
required
/>
</label>
<label>
Password
<input
type="password"
name="password"
placeholder="Password"
autocomplete="current-password"
required
/>
</label>
</fieldset>
<div role="group">
{ACCOUNT_REGISTRATION && (
<a href="/register" role="button" class="secondary">
Register an account
</a>
)}
<input type="submit" value="Login" />
</div>
</form>
</article>
</main>
<>
<Header accountRegistration={ACCOUNT_REGISTRATION} />
<main class="container">
<article>
<form method="post">
<fieldset>
<label>
Email
<input
type="email"
name="email"
placeholder="Email"
autocomplete="email"
required
/>
</label>
<label>
Password
<input
type="password"
name="password"
placeholder="Password"
autocomplete="current-password"
required
/>
</label>
</fieldset>
<div role="group">
{ACCOUNT_REGISTRATION && (
<a href="/register" role="button" class="secondary">
Register an account
</a>
)}
<input type="submit" value="Login" />
</div>
</form>
</article>
</main>
</>
</BaseHtml>
);
})
.post(
"/login",
async function handler({ body, set, redirect, jwt, cookie: { auth } }) {
const existingUser = (await db
const existingUser = await db
.query("SELECT * FROM users WHERE email = ?")
.get(body.email)) as IUser;
.as(User)
.get(body.email);
if (!existingUser) {
set.status = 403;
@@ -398,9 +413,10 @@ const app = new Elysia()
}
// make sure user exists in db
const existingUser = (await db
const existingUser = await db
.query("SELECT * FROM users WHERE id = ?")
.get(user.id)) as IUser;
.as(User)
.get(user.id);
if (!existingUser) {
if (auth?.value) {
@@ -437,16 +453,17 @@ const app = new Elysia()
return (
<BaseHtml>
<Header loggedIn />
<main class="container">
<article>
<h1>Convert</h1>
<div style={{ maxHeight: "50vh", overflowY: "auto" }}>
<table id="file-list" class="striped" />
</div>
<input type="file" name="file" multiple />
{/* <label for="convert_from">Convert from</label> */}
{/* <select name="convert_from" aria-label="Convert from" required>
<>
<Header loggedIn />
<main class="container">
<article>
<h1>Convert</h1>
<div style={{ maxHeight: "50vh", overflowY: "auto" }}>
<table id="file-list" class="striped" />
</div>
<input type="file" name="file" multiple />
{/* <label for="convert_from">Convert from</label> */}
{/* <select name="convert_from" aria-label="Convert from" required>
<option selected disabled value="">
Convert from
</option>
@@ -455,31 +472,34 @@ const app = new Elysia()
<option>{input}</option>
))}
</select> */}
</article>
<form method="post" action="/convert">
<input type="hidden" name="file_names" id="file_names" />
<article>
<select name="convert_to" aria-label="Convert to" required>
<option selected disabled value="">
Convert to
</option>
{Object.entries(getAllTargets()).map(([converter, targets]) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<optgroup label={converter}>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>
{target}
</option>
))}
</optgroup>
))}
</select>
</article>
<input type="submit" value="Convert" />
</form>
</main>
<script src="script.js" defer />
<form method="post" action="/convert">
<input type="hidden" name="file_names" id="file_names" />
<article>
<select name="convert_to" aria-label="Convert to" required>
<option selected disabled value="">
Convert to
</option>
{Object.entries(getAllTargets()).map(
([converter, targets]) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<optgroup label={converter}>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>
{target}
</option>
))}
</optgroup>
),
)}
</select>
</article>
<input type="submit" value="Convert" />
</form>
</main>
<script src="script.js" defer />
</>
</BaseHtml>
);
})
@@ -603,9 +623,10 @@ const app = new Elysia()
return redirect("/", 302);
}
const existingJob = (await db
const existingJob = await db
.query("SELECT * FROM jobs WHERE id = ? AND user_id = ?")
.get(jobId.value, user.id)) as IJobs;
.as(Jobs)
.get(jobId.value, user.id);
if (!existingJob) {
return redirect("/", 302);
@@ -634,14 +655,12 @@ const app = new Elysia()
return redirect("/", 302);
}
db.run(
"UPDATE jobs SET num_files = ?, status = 'pending' WHERE id = ?",
fileNames.length,
jobId.value,
);
db.query(
"UPDATE jobs SET num_files = ?1, status = 'pending' WHERE id = ?2",
).run(fileNames.length, jobId.value);
const query = db.query(
"INSERT INTO file_names (job_id, file_name, output_file_name, status) VALUES (?, ?, ?, ?)",
"INSERT INTO file_names (job_id, file_name, output_file_name, status) VALUES (?1, ?2, ?3, ?4)",
);
// Start the conversion process in the background
@@ -662,16 +681,18 @@ const app = new Elysia()
{},
converterName,
);
query.run(jobId.value, fileName, newFileName, result);
if (jobId.value) {
query.run(jobId.value, fileName, newFileName, result);
}
}),
)
.then(() => {
// All conversions are done, update the job status to 'completed'
db.run(
"UPDATE jobs SET status = 'completed' WHERE id = ?",
jobId.value,
);
if (jobId.value) {
db.query("UPDATE jobs SET status = 'completed' WHERE id = ?1").run(
jobId.value,
);
}
// delete all uploaded files in userUploadsDir
// rmSync(userUploadsDir, { recursive: true, force: true });
@@ -702,12 +723,14 @@ const app = new Elysia()
let userJobs = db
.query("SELECT * FROM jobs WHERE user_id = ?")
.all(user.id) as IJobs[];
.as(Jobs)
.all(user.id);
for (const job of userJobs) {
const files = db
.query("SELECT * FROM file_names WHERE job_id = ?")
.all(job.id) as IFileNames[];
.as(Filename)
.all(job.id);
job.finished_files = files.length;
}
@@ -717,37 +740,39 @@ const app = new Elysia()
return (
<BaseHtml title="ConvertX | Results">
<Header loggedIn />
<main class="container">
<article>
<h1>Results</h1>
<table>
<thead>
<tr>
<th>Time</th>
<th>Files</th>
<th>Files Done</th>
<th>Status</th>
<th>View</th>
</tr>
</thead>
<tbody>
{userJobs.map((job) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<>
<Header loggedIn />
<main class="container">
<article>
<h1>Results</h1>
<table>
<thead>
<tr>
<td safe>{job.date_created}</td>
<td>{job.num_files}</td>
<td>{job.finished_files}</td>
<td safe>{job.status}</td>
<td>
<a href={`/results/${job.id}`}>View</a>
</td>
<th>Time</th>
<th>Files</th>
<th>Files Done</th>
<th>Status</th>
<th>View</th>
</tr>
))}
</tbody>
</table>
</article>
</main>
</thead>
<tbody>
{userJobs.map((job) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<tr>
<td safe>{job.date_created}</td>
<td>{job.num_files}</td>
<td>{job.finished_files}</td>
<td safe>{job.status}</td>
<td>
<a href={`/results/${job.id}`}>View</a>
</td>
</tr>
))}
</tbody>
</table>
</article>
</main>
</>
</BaseHtml>
);
})
@@ -768,9 +793,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;
@@ -783,65 +809,68 @@ 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 (
<BaseHtml title="ConvertX | Result">
<Header loggedIn />
<main class="container">
<article>
<div class="grid">
<h1>Results</h1>
<div>
<button
type="button"
style={{ width: "10rem", float: "right" }}
onclick="downloadAll()"
{...(files.length !== job.num_files
? { disabled: true, "aria-busy": "true" }
: "")}>
{files.length === job.num_files
? "Download All"
: "Converting..."}
</button>
<>
<Header loggedIn />
<main class="container">
<article>
<div class="grid">
<h1>Results</h1>
<div>
<button
type="button"
style={{ width: "10rem", float: "right" }}
onclick="downloadAll()"
{...(files.length !== job.num_files
? { disabled: true, "aria-busy": "true" }
: "")}>
{files.length === job.num_files
? "Download All"
: "Converting..."}
</button>
</div>
</div>
</div>
<progress max={job.num_files} value={files.length} />
<table>
<thead>
<tr>
<th>Converted File Name</th>
<th>Status</th>
<th>View</th>
<th>Download</th>
</tr>
</thead>
<tbody>
{files.map((file) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<progress max={job.num_files} value={files.length} />
<table>
<thead>
<tr>
<td safe>{file.output_file_name}</td>
<td safe>{file.status}</td>
<td>
<a
href={`/download/${outputPath}${file.output_file_name}`}>
View
</a>
</td>
<td>
<a
href={`/download/${outputPath}${file.output_file_name}`}
download={file.output_file_name}>
Download
</a>
</td>
<th>Converted File Name</th>
<th>Status</th>
<th>View</th>
<th>Download</th>
</tr>
))}
</tbody>
</table>
</article>
</main>
<script src="/results.js" defer />
</thead>
<tbody>
{files.map((file) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<tr>
<td safe>{file.output_file_name}</td>
<td safe>{file.status}</td>
<td>
<a
href={`/download/${outputPath}${file.output_file_name}`}>
View
</a>
</td>
<td>
<a
href={`/download/${outputPath}${file.output_file_name}`}
download={file.output_file_name}>
Download
</a>
</td>
</tr>
))}
</tbody>
</table>
</article>
</main>
<script src="/results.js" defer />
</>
</BaseHtml>
);
},
@@ -863,9 +892,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;
@@ -878,7 +908,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 (
<article>
@@ -974,50 +1005,54 @@ const app = new Elysia()
return (
<BaseHtml title="ConvertX | Converters">
<Header loggedIn />
<main class="container">
<article>
<h1>Converters</h1>
<table>
<thead>
<tr>
<th>Converter</th>
<th>From (Count)</th>
<th>To (Count)</th>
</tr>
</thead>
<tbody>
{Object.entries(getAllTargets()).map(([converter, targets]) => {
const inputs = getAllInputs(converter);
return (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<tr>
<td safe>{converter}</td>
<td>
Count: {inputs.length}
<ul>
{inputs.map((input) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<li safe>{input}</li>
))}
</ul>
</td>
<td>
Count: {targets.length}
<ul>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<li safe>{target}</li>
))}
</ul>
</td>
</tr>
);
})}
</tbody>
</table>
</article>
</main>
<>
<Header loggedIn />
<main class="container">
<article>
<h1>Converters</h1>
<table>
<thead>
<tr>
<th>Converter</th>
<th>From (Count)</th>
<th>To (Count)</th>
</tr>
</thead>
<tbody>
{Object.entries(getAllTargets()).map(
([converter, targets]) => {
const inputs = getAllInputs(converter);
return (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<tr>
<td safe>{converter}</td>
<td>
Count: {inputs.length}
<ul>
{inputs.map((input) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<li safe>{input}</li>
))}
</ul>
</td>
<td>
Count: {targets.length}
<ul>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<li safe>{target}</li>
))}
</ul>
</td>
</tr>
);
},
)}
</tbody>
</table>
</article>
</main>
</>
</BaseHtml>
);
})
@@ -1064,7 +1099,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

View File

@@ -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,