58 Commits

Author SHA1 Message Date
Emrik Östling
277a35b5df Merge pull request #32 from C4illin/release-please--branches--main--components--convertx-frontend 2024-06-20 20:27:26 +02:00
github-actions[bot]
42124e08b2 chore(main): release 0.2.0 2024-06-20 18:24:09 +00:00
C4illin
13169574f0 feat: change from debian to alpine
issue #34
2024-06-20 20:23:34 +02:00
C4illin
6fb07f0d13 build(deps-dev): update typescroipt 2024-06-20 20:10:02 +02:00
Emrik Östling
8121114ccb Merge pull request #40 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.6
build(deps-dev): update @types/node requirement from ^20.14.5 to ^20.14.6
2024-06-20 11:20:37 +02:00
dependabot[bot]
81881af1c1 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-06-20 08:58:16 +00:00
Emrik Östling
bbb4117e9d Merge pull request #41 from C4illin/dependabot/npm_and_yarn/types/bun-tw-1.1.5
build(deps-dev): update @types/bun requirement from ^1.1.4 to ^1.1.5
2024-06-20 10:56:48 +02:00
dependabot[bot]
d7ec8179d8 build(deps-dev): update @types/bun requirement from ^1.1.4 to ^1.1.5
---
updated-dependencies:
- dependency-name: "@types/bun"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-20 08:51:56 +00:00
Emrik Östling
cef60afee3 Merge pull request #37 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.13.1
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.13.0 to ^7.13.1
2024-06-19 00:40:57 +02:00
dependabot[bot]
ccf116acde 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.13.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-06-18 09:44:48 +00:00
Emrik Östling
f609984c90 Merge pull request #38 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.5
build(deps-dev): update @types/node requirement from ^20.14.2 to ^20.14.5
2024-06-18 11:44:10 +02:00
dependabot[bot]
663e654c80 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-06-18 09:43:46 +00:00
Emrik Östling
31050dbf66 Merge pull request #36 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.13.1
build(deps-dev): update @typescript-eslint/parser requirement from ^7.13.0 to ^7.13.1
2024-06-18 11:42:16 +02:00
dependabot[bot]
8918c418f4 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.13.1/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 08:30:14 +00:00
Emrik Östling
56266e0da8 Merge pull request #35 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.0.24
build(deps): update elysia requirement from ^1.0.23 to ^1.0.24
2024-06-18 10:28:46 +02:00
dependabot[bot]
a3f5b5153a build(deps): update elysia requirement from ^1.0.23 to ^1.0.24
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 08:16:34 +00:00
Emrik Östling
6b4c7a16e0 Merge pull request #33 from C4illin/dependabot/npm_and_yarn/types/bun-tw-1.1.4
build(deps-dev): update @types/bun requirement from ^1.1.3 to ^1.1.4
2024-06-13 12:43:00 +02:00
dependabot[bot]
7c7756713b build(deps-dev): update @types/bun requirement from ^1.1.3 to ^1.1.4
---
updated-dependencies:
- dependency-name: "@types/bun"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-13 08:22:51 +00:00
Emrik Östling
15d4233a82 Merge pull request #31 from C4illin/feature-libjxl 2024-06-11 19:36:52 +02:00
C4illin
a1411a7559 chore: update readme with libjxl 2024-06-11 19:36:19 +02:00
C4illin
853a4c4f32 chore: format 2024-06-11 19:32:23 +02:00
C4illin
b05b0a14b0 build(deps-dev): update trustedDependencies in package.json 2024-06-11 19:31:40 +02:00
C4illin
ff680cb295 feat: add libjxl for jpegxl conversion 2024-06-11 19:30:06 +02:00
Emrik Östling
31e1a3124c Merge pull request #30 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.13.0
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.12.0 to ^7.13.0
2024-06-11 15:52:39 +02:00
dependabot[bot]
70278ef0b6 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.13.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-06-11 10:28:16 +00:00
Emrik Östling
0a33fb32e7 Merge pull request #29 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.13.0
build(deps-dev): update @typescript-eslint/parser requirement from ^7.12.0 to ^7.13.0
2024-06-11 12:26:48 +02:00
dependabot[bot]
26f52a5122 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.13.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 10:24:09 +00:00
Emrik Östling
8f8de4295a Merge pull request #28 from C4illin/dependabot/npm_and_yarn/biomejs/biome-1.8.1
build(deps-dev): bump @biomejs/biome from 1.8.0 to 1.8.1
2024-06-11 12:22:41 +02:00
dependabot[bot]
660b342f2e build(deps-dev): bump @biomejs/biome from 1.8.0 to 1.8.1
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.8.0 to 1.8.1.
- [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.1/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-11 10:08:39 +00:00
Emrik Östling
6306a99740 Merge pull request #27 from C4illin/dependabot/npm_and_yarn/prettier-tw-3.3.2
build(deps-dev): update prettier requirement from ^3.3.1 to ^3.3.2
2024-06-11 12:07:08 +02:00
dependabot[bot]
5ca6f45809 build(deps-dev): update prettier requirement from ^3.3.1 to ^3.3.2
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.1...3.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 09:03:10 +00:00
Emrik Östling
3ea3e1dd01 Merge pull request #26 from C4illin/release-please--branches--main--components--convertx-frontend 2024-06-10 23:09:12 +02:00
github-actions[bot]
2fddfbe24a chore(main): release 0.1.2 2024-06-10 21:07:51 +00:00
C4illin
25df58ba82 fix: fix incorrect redirect
issue #23
2024-06-10 23:06:26 +02:00
Emrik Östling
249bccdc7d Merge pull request #25 from C4illin/dependabot/npm_and_yarn/elysia-tw-1.0.23
build(deps): update elysia requirement from ^1.0.22 to ^1.0.23
2024-06-10 17:22:00 +02:00
dependabot[bot]
ec0e2db0e9 build(deps): update elysia requirement from ^1.0.22 to ^1.0.23
---
updated-dependencies:
- dependency-name: elysia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 08:26:45 +00:00
Emrik Östling
ef9b68e0da Merge pull request #22 from C4illin/dependabot/npm_and_yarn/prettier-tw-3.3.1
build(deps-dev): update prettier requirement from ^3.3.0 to ^3.3.1
2024-06-06 10:46:58 +02:00
dependabot[bot]
31789738fc build(deps-dev): update prettier requirement from ^3.3.0 to ^3.3.1
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.0...3.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-06 08:24:30 +00:00
Emrik Östling
5fa349a80e Merge pull request #21 from C4illin/dependabot/npm_and_yarn/biomejs/biome-1.8.0
build(deps-dev): bump @biomejs/biome from 1.7.3 to 1.8.0
2024-06-05 16:01:20 +02:00
dependabot[bot]
5dfd0f6f44 build(deps-dev): bump @biomejs/biome from 1.7.3 to 1.8.0
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.7.3 to 1.8.0.
- [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.0/packages/@biomejs/biome)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 14:01:06 +00:00
Emrik Östling
bfa6301570 Merge pull request #20 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.2
build(deps-dev): update @types/node requirement from ^20.14.1 to ^20.14.2
2024-06-05 15:59:36 +02:00
dependabot[bot]
3ea52c4faf 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-06-05 08:22:45 +00:00
Emrik Östling
391e62bfee Merge pull request #17 from C4illin/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-tw-7.12.0
build(deps-dev): update @typescript-eslint/eslint-plugin requirement from ^7.11.0 to ^7.12.0
2024-06-04 10:42:36 +02:00
dependabot[bot]
4d1da58f74 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.12.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-06-04 08:39:26 +00:00
Emrik Östling
6dec9ae93b Merge pull request #18 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.1
build(deps-dev): update @types/node requirement from ^20.14.0 to ^20.14.1
2024-06-04 10:38:11 +02:00
dependabot[bot]
b466a6de99 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-06-04 08:37:29 +00:00
Emrik Östling
186681ef44 Merge pull request #19 from C4illin/dependabot/npm_and_yarn/typescript-eslint/parser-tw-7.12.0
build(deps-dev): update @typescript-eslint/parser requirement from ^7.11.0 to ^7.12.0
2024-06-04 10:35:57 +02:00
dependabot[bot]
1e2273b7c4 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.12.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-04 08:15:31 +00:00
Emrik Östling
8d17f59a58 Merge pull request #16 from C4illin/dependabot/npm_and_yarn/types/node-tw-20.14.0 2024-06-03 10:44:35 +02:00
dependabot[bot]
d8fcd15aeb 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-06-03 08:44:25 +00:00
Emrik Östling
8cc0eee254 Merge pull request #15 from C4illin/dependabot/npm_and_yarn/prettier-tw-3.3.0 2024-06-03 10:42:55 +02:00
dependabot[bot]
e4b69023d9 build(deps-dev): update prettier requirement from ^3.2.5 to ^3.3.0
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.2.5...3.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 08:28:22 +00:00
Emrik Östling
7d40890636 chore: add image size to readme 2024-06-01 13:07:22 +02:00
Emrik Östling
3ecd2c62ae chore: add to todo 2024-06-01 13:02:31 +02:00
Emrik Östling
16cabab0d0 chore: add link to packages 2024-06-01 00:18:48 +02:00
Emrik Östling
3e1c9e147f chore: add badges 2024-05-31 16:42:15 +02:00
Emrik Östling
5e7a0f5634 chore: add links to converters 2024-05-31 16:27:24 +02:00
Emrik Östling
61b02206c0 Update release-please.yml 2024-05-31 16:15:15 +02:00
13 changed files with 205 additions and 31 deletions

View File

@@ -18,7 +18,8 @@ jobs:
# this assumes that you have created a personal access token # this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named # (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} # token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs" # this is a built-in strategy in release-please, see "Action Inputs"
# for more options # for more options
release-type: node release-type: node

View File

@@ -1,5 +1,20 @@
# Changelog # Changelog
## [0.2.0](https://github.com/C4illin/ConvertX/compare/v0.1.2...v0.2.0) (2024-06-20)
### Features
* add libjxl for jpegxl conversion ([ff680cb](https://github.com/C4illin/ConvertX/commit/ff680cb29534a25c3148a90fd064bb86c71fb482))
* change from debian to alpine ([1316957](https://github.com/C4illin/ConvertX/commit/13169574f0134ae236f8d41287bb73930b575e82)), closes [#34](https://github.com/C4illin/ConvertX/issues/34)
## [0.1.2](https://github.com/C4illin/ConvertX/compare/v0.1.1...v0.1.2) (2024-06-10)
### Bug Fixes
* fix incorrect redirect ([25df58b](https://github.com/C4illin/ConvertX/commit/25df58ba82321aaa6617811a6995cb96c2a00a40)), closes [#23](https://github.com/C4illin/ConvertX/issues/23)
## [0.1.1](https://github.com/C4illin/ConvertX/compare/v0.1.0...v0.1.1) (2024-05-30) ## [0.1.1](https://github.com/C4illin/ConvertX/compare/v0.1.0...v0.1.1) (2024-05-30)

63
Debian.Dockerfile Normal file
View File

@@ -0,0 +1,63 @@
FROM oven/bun:1-debian as base
WORKDIR /app
# install dependencies into temp directory
# this will cache them and speed up future builds
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
# FROM base AS install-libjxl-tools
# download
# copy node_modules from temp directory
# then copy all (non-ignored) project files into the image
# FROM base AS prerelease
# COPY --from=install /temp/dev/node_modules node_modules
# COPY . .
# # [optional] tests & build
# ENV NODE_ENV=production
# RUN bun test
# RUN bun run build
# copy production dependencies and source code into final image
FROM base AS release
LABEL maintainer="Emrik Östling (C4illin)"
LABEL description="ConvertX: self-hosted online file converter supporting 700+ file formats."
LABEL repo="https://github.com/C4illin/ConvertX"
# install additional dependencies
RUN rm -rf /var/lib/apt/lists/partial && apt-get update -o Acquire::CompressionTypes::Order::=gz \
&& apt-get install -y \
pandoc \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-latex-extra \
ffmpeg \
graphicsmagick \
ghostscript \
libvips-tools
# # libjxl is not available in the official debian repositories
# RUN wget https://github.com/libjxl/libjxl/releases/download/v0.10.2/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz -O /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz \
# && mkdir -p /tmp/libjxl \
# && tar -xvf /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz -C /tmp/libjxl \
# && dpkg -i /tmp/libjxl/libjxl_0.10.2_amd64.deb /tmp/libjxl/jxl_0.10.2_amd64.deb \
# && rm -rf /tmp/jxl-debs-amd64-debian-bullseye-v0.10.2.tar.gz /tmp/libjxl
COPY --from=install /temp/prod/node_modules node_modules
# COPY --from=prerelease /app/src/index.tsx /app/src/
# COPY --from=prerelease /app/package.json .
COPY . .
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "run", "./src/index.tsx" ]

View File

@@ -1,4 +1,4 @@
FROM oven/bun:1-debian as base FROM oven/bun:1-alpine as base
WORKDIR /app WORKDIR /app
# install dependencies into temp directory # install dependencies into temp directory
@@ -31,16 +31,18 @@ LABEL description="ConvertX: self-hosted online file converter supporting 700+ f
LABEL repo="https://github.com/C4illin/ConvertX" LABEL repo="https://github.com/C4illin/ConvertX"
# install additional dependencies # install additional dependencies
RUN rm -rf /var/lib/apt/lists/partial && apt-get update -o Acquire::CompressionTypes::Order::=gz \ RUN apk --no-cache add \
&& apt-get install -y \
pandoc \ pandoc \
texlive-latex-recommended \ texlive \
texlive-fonts-recommended \ texmf-dist-latexextra \
texlive-latex-extra \
ffmpeg \ ffmpeg \
graphicsmagick \ graphicsmagick \
ghostscript \ ghostscript \
libvips-tools vips-tools \
libjxl-tools
# this might be needed for some latex use cases, will add it if needed.
# texmf-dist-fontsextra \
COPY --from=install /temp/prod/node_modules node_modules COPY --from=install /temp/prod/node_modules node_modules
# COPY --from=prerelease /app/src/index.tsx /app/src/ # COPY --from=prerelease /app/src/index.tsx /app/src/

View File

@@ -1,10 +1,13 @@
![ConvertX](images/logo.png) ![ConvertX](images/logo.png)
# ConvertX # ConvertX
[![Docker](https://github.com/C4illin/ConvertX/actions/workflows/docker-publish.yml/badge.svg?branch=main)](https://github.com/C4illin/ConvertX/actions/workflows/docker-publish.yml) [![Docker](https://github.com/C4illin/ConvertX/actions/workflows/docker-publish.yml/badge.svg?branch=main)](https://github.com/C4illin/ConvertX/actions/workflows/docker-publish.yml)
![GitHub Release](https://img.shields.io/github/v/release/C4illin/ConvertX) [![GitHub Release](https://img.shields.io/github/v/release/C4illin/ConvertX)](https://github.com/C4illin/ConvertX/pkgs/container/convertx)
![GitHub commits since latest release](https://img.shields.io/github/commits-since/C4illin/ConvertX/latest) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/C4illin/ConvertX/latest)
![GitHub repo size](https://img.shields.io/github/repo-size/C4illin/ConvertX)
![Docker container size](https://ghcr-badge.egpl.dev/c4illin/convertx/size?color=%230375b6&tag=latest&label=image+size&trim=)
![GitHub top language](https://img.shields.io/github/languages/top/C4illin/ConvertX)
A self-hosted online file converter. Supports 831 different formats. Written with Typescript, Bun and Elysia. A self-hosted online file converter. Supports 831 different formats. Written with TypeScript, Bun and Elysia.
## Features ## Features
@@ -14,13 +17,14 @@ A self-hosted online file converter. Supports 831 different formats. Written wit
## Converters supported ## Converters supported
| Converter | Use case | Converts from | Converts to | | Converter | Use case | Converts from | Converts to |
|----------------|---------------|---------------|-------------| |------------------------------------------------------------------------------|---------------|---------------|-------------|
| Vips | Images (fast) | 45 | 23 | | [libjxl](https://github.com/libjxl/libjxl) | JPEG XL | 11 | 11 |
| PDFLaTeX | Documents | 1 | 1 | | [Vips](https://github.com/libvips/libvips) | Images | 45 | 23 |
| Pandoc | Documents | 43 | 65 | | [PDFLaTeX](https://www.math.rug.nl/~trentelman/jacob/pdflatex/pdflatex.html) | Documents | 1 | 1 |
| GraphicsMagick | Images | 166 | 133 | | [Pandoc](https://pandoc.org/) | Documents | 43 | 65 |
| FFmpeg | Video | ~473 | ~280 | | [GraphicsMagick](http://www.graphicsmagick.org/) | Images | 166 | 133 |
| [FFmpeg](https://ffmpeg.org/) | Video | ~473 | ~280 |
<!-- many ffmpeg fileformats are duplicates --> <!-- many ffmpeg fileformats are duplicates -->
@@ -62,6 +66,7 @@ Tutorial in french: https://belginux.com/installer-convertx-avec-docker/
- [ ] Divide index.tsx into smaller components - [ ] Divide index.tsx into smaller components
- [ ] Add tests - [ ] Add tests
- [ ] Add searchable list of formats - [ ] Add searchable list of formats
- [ ] Make the upload button nicer and more easy to drop files on. Support copy paste as well if possible.
## Contributors ## Contributors

BIN
bun.lockb

Binary file not shown.

View File

@@ -2,6 +2,7 @@ services:
convertx: convertx:
build: build:
context: . context: .
# dockerfile: Debian.Dockerfile
volumes: volumes:
- ./data:/app/data - ./data:/app/data
environment: environment:

View File

@@ -1,6 +1,6 @@
{ {
"name": "convertx-frontend", "name": "convertx-frontend",
"version": "0.1.1", "version": "0.2.0",
"scripts": { "scripts": {
"dev": "bun run --watch src/index.tsx", "dev": "bun run --watch src/index.tsx",
"hot": "bun run --hot src/index.tsx", "hot": "bun run --hot src/index.tsx",
@@ -12,28 +12,31 @@
"@elysiajs/html": "^1.0.2", "@elysiajs/html": "^1.0.2",
"@elysiajs/jwt": "^1.0.2", "@elysiajs/jwt": "^1.0.2",
"@elysiajs/static": "^1.0.3", "@elysiajs/static": "^1.0.3",
"elysia": "^1.0.22" "elysia": "^1.0.24"
}, },
"module": "src/index.tsx", "module": "src/index.tsx",
"bun-create": { "bun-create": {
"start": "bun run src/index.tsx" "start": "bun run src/index.tsx"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.7.3", "@biomejs/biome": "1.8.1",
"@ianvs/prettier-plugin-sort-imports": "^4.2.1", "@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@kitajs/ts-html-plugin": "^4.0.1", "@kitajs/ts-html-plugin": "^4.0.1",
"@picocss/pico": "^2.0.6", "@picocss/pico": "^2.0.6",
"@total-typescript/ts-reset": "^0.5.1", "@total-typescript/ts-reset": "^0.5.1",
"@types/bun": "^1.1.3", "@types/bun": "^1.1.5",
"@types/eslint": "^8.56.10", "@types/eslint": "^8.56.10",
"@types/node": "^20.12.13", "@types/node": "^20.14.6",
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.11.0", "@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.11.0", "@typescript-eslint/parser": "^7.13.1",
"cpy-cli": "^5.0.0", "cpy-cli": "^5.0.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5", "prettier": "^3.3.2",
"typescript": "^5.4.5" "typescript": "^5.5.2"
} },
"trustedDependencies": [
"@biomejs/biome"
]
} }

View File

@@ -50,4 +50,4 @@ export const Header = ({
</nav> </nav>
</header> </header>
); );
}; };

71
src/converters/libjxl.ts Normal file
View File

@@ -0,0 +1,71 @@
import { exec } from "node:child_process";
// declare possible conversions
export const properties = {
from: {
jxl: ["jxl"],
images: [
"apng",
"exr",
"gif",
"jpeg",
"pam",
"pfm",
"pgm",
"pgx",
"png",
"ppm",
],
},
to: {
jxl: [
"apng",
"exr",
"gif",
"jpeg",
"pam",
"pfm",
"pgm",
"pgx",
"png",
"ppm",
],
images: ["jxl"],
},
};
export function convert(
filePath: string,
fileType: string,
convertTo: string,
targetPath: string,
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
options?: any,
): Promise<string> {
let tool = "";
if (fileType === "jxl") {
tool = "djxl";
}
if (convertTo === "jxl") {
tool = "cjxl";
}
return new Promise((resolve, reject) => {
exec(`${tool} "${filePath}" "${targetPath}"`, (error, stdout, stderr) => {
if (error) {
reject(`error: ${error}`);
}
if (stdout) {
console.log(`stdout: ${stdout}`);
}
if (stderr) {
console.error(`stderr: ${stderr}`);
}
resolve("success");
});
});
}

View File

@@ -20,6 +20,11 @@ import {
properties as propertiesPdflatex, properties as propertiesPdflatex,
} from "./pdflatex"; } from "./pdflatex";
import {
convert as convertLibjxl,
properties as propertiesLibjxl,
} from "./libjxl";
import { normalizeFiletype } from "../helpers/normalizeFiletype"; import { normalizeFiletype } from "../helpers/normalizeFiletype";
// This should probably be reconstructed so that the functions are not imported instead the functions hook into this to make the converters more modular // This should probably be reconstructed so that the functions are not imported instead the functions hook into this to make the converters more modular
@@ -50,6 +55,10 @@ const properties: {
) => any; ) => any;
}; };
} = { } = {
libjxl: {
properties: propertiesLibjxl,
converter: convertLibjxl,
},
vips: { vips: {
properties: propertiesImage, properties: propertiesImage,
converter: convertImage, converter: convertImage,

View File

@@ -19,7 +19,11 @@ export function convert(
): Promise<string> { ): Promise<string> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// const fileName: string = (targetPath.split("/").pop() as string).replace(".pdf", "") // const fileName: string = (targetPath.split("/").pop() as string).replace(".pdf", "")
const outputPath = targetPath.split("/").slice(0, -1).join("/").replace("./", "") const outputPath = targetPath
.split("/")
.slice(0, -1)
.join("/")
.replace("./", "");
exec( exec(
`pdflatex -interaction=nonstopmode -output-directory="${outputPath}" "${filePath}"`, `pdflatex -interaction=nonstopmode -output-directory="${outputPath}" "${filePath}"`,
(error, stdout, stderr) => { (error, stdout, stderr) => {

View File

@@ -677,7 +677,7 @@ const app = new Elysia()
}); });
// Redirect the client immediately // Redirect the client immediately
return redirect(`/results/, 302${jobId.value}`); return redirect(`/results/${jobId.value}`, 302);
}, },
{ {
body: t.Object({ body: t.Object({