From 68a5b3fd8dabf95a45a5ee379e8fbbebadf02255 Mon Sep 17 00:00:00 2001 From: oleole39 <59071673+oleole39@users.noreply.github.com> Date: Mon, 16 Feb 2026 01:56:21 +0100 Subject: [PATCH 1/5] use upstream prebuilt app package --- conf/nginx.conf | 6 +++--- manifest.toml | 18 +++++++++--------- scripts/install | 11 ----------- scripts/upgrade | 10 ---------- 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6d0a5fd..810a87c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,10 +2,10 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/dist/; - index index.html; + alias __INSTALL_DIR__/; + index tools.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /tools.html; # Cache static assets location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|wasm)$ { diff --git a/manifest.toml b/manifest.toml index ebb495c..ad1c7d5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -26,8 +26,8 @@ multi_instance = true ldap = false sso = false -disk = "2000M" -ram.build = "3000M" +disk = "250M" +ram.build = "0M" ram.runtime = "150M" [install] @@ -43,10 +43,13 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/alam00000/bentopdf/archive/refs/tags/v2.2.1.tar.gz" - sha256 = "8eb091ea27fc451f832999486ad6281eddafd17086197e3d2f8af09e0595a547" - - autoupdate.strategy = "latest_github_tag" + url = "https://github.com/alam00000/bentopdf/releases/download/v2.2.1/dist-2.2.1.zip" + sha256 = "6e9aed3c6e4815145d7a283834782a006dd4ad52a8de7eb0e4dd91ca4f5406b7" + format = "zip" + extract = true + in_subdir = false + autoupdate.strategy = "latest_github_release" + autoupdate.asset = "dist-*.zip" [resources.system_user] @@ -55,6 +58,3 @@ ram.runtime = "150M" [resources.permissions] main.url = "/" - - [resources.nodejs] - version = "22" diff --git a/scripts/install b/scripts/install index 7a56f17..cc414ce 100755 --- a/scripts/install +++ b/scripts/install @@ -22,18 +22,7 @@ ynh_script_progression "Adding system configurations related to $app..." # Create a dedicated NGINX config using the conf/nginx.conf template ynh_config_add_nginx -#================================================= -# INSTALL BENTOPDF -#================================================= -ynh_script_progression "Installing the app..." - -pushd "$install_dir" - ynh_hide_warnings ynh_exec_as_app npm install - ynh_hide_warnings ynh_exec_as_app SIMPLE_MODE=true npm run build -popd - #================================================= # END OF SCRIPT #================================================= - ynh_script_progression "Installation of $app completed" diff --git a/scripts/upgrade b/scripts/upgrade index dfa717f..4d9898b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,16 +20,6 @@ ynh_script_progression "Upgrading system configurations related to $app..." ynh_config_add_nginx -#================================================= -# INSTALL BENTOPDF -#================================================= -ynh_script_progression "Installing the app..." - -pushd "$install_dir" - ynh_hide_warnings ynh_exec_as_app npm install - ynh_hide_warnings ynh_exec_as_app SIMPLE_MODE=true npm run build -popd - #================================================= # END OF SCRIPT #================================================= From 2a7820cca6bf2df03fbe8cae384cb32c25d4f2c9 Mon Sep 17 00:00:00 2001 From: oleole39 <59071673+oleole39@users.noreply.github.com> Date: Mon, 16 Feb 2026 13:46:21 +0100 Subject: [PATCH 2/5] allow loading MJS files. Co-authored-by: Klodd --- conf/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 810a87c..abfeaae 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,6 +12,15 @@ location __PATH__/ { expires 1y; more_set_headers "Cache-Control: public, immutable"; } + + # Make all app workers load + location ~* \.mjs$ { + # target only *.mjs files - we can safely override types since + # we are only targeting a single file extension. + types { + text/javascript mjs; + } + } # Security headers more_set_headers "X-Frame-Options: SAMEORIGIN always"; From afc82398b71fac9631bbb4e770b97f254ab7904e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:23:23 +0200 Subject: [PATCH 3/5] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ad1c7d5..61ca2a2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "BentoPDF" description.en = "Privacy First PDF Toolkit" description.fr = "Kit d'outils PDF Privacy First" -version = "2.2.1~ynh1" +version = "2.7.0~ynh1" maintainers = ["eric_G"] @@ -43,8 +43,8 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/alam00000/bentopdf/releases/download/v2.2.1/dist-2.2.1.zip" - sha256 = "6e9aed3c6e4815145d7a283834782a006dd4ad52a8de7eb0e4dd91ca4f5406b7" + url = "https://github.com/alam00000/bentopdf/releases/download/v2.7.0/dist-2.7.0.zip" + sha256 = "1d390be93be15fe9d0ea8a22bf356e5155ee72dd05be42aed3d6e7e3eb76fe17" format = "zip" extract = true in_subdir = false From 645a100100659e6d645a43af7d102c8a5c093c9c Mon Sep 17 00:00:00 2001 From: oleole39 <59071673+oleole39@users.noreply.github.com> Date: Sun, 5 Apr 2026 15:13:51 +0200 Subject: [PATCH 4/5] switch to simple version --- conf/nginx.conf | 4 ++-- manifest.toml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1ca1b24..2b96867 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,9 +3,9 @@ location __PATH__/ { # Path to source alias __INSTALL_DIR__/; - index tools.html; + index index.html; - try_files $uri $uri/ /tools.html; + try_files $uri $uri/ /index.html; location ~* \.html$ { diff --git a/manifest.toml b/manifest.toml index 61ca2a2..c83ec38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,13 +43,13 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/alam00000/bentopdf/releases/download/v2.7.0/dist-2.7.0.zip" - sha256 = "1d390be93be15fe9d0ea8a22bf356e5155ee72dd05be42aed3d6e7e3eb76fe17" + url = "https://github.com/alam00000/bentopdf/releases/download/v2.8.2/dist-simple-2.8.2.zip" + sha256 = "40aa4de1030c71c762df305cd9cddc3c0d2d91161b3a52c361e9d006b7cbc752" format = "zip" extract = true in_subdir = false autoupdate.strategy = "latest_github_release" - autoupdate.asset = "dist-*.zip" + autoupdate.asset = "dist-simple-*.zip" [resources.system_user] From 1f3a0d0bcf0243a4e497a743cf528a5f48c1d711 Mon Sep 17 00:00:00 2001 From: oleole39 <59071673+oleole39@users.noreply.github.com> Date: Sun, 5 Apr 2026 15:23:52 +0200 Subject: [PATCH 5/5] keep optional config.json if it exists --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4d9898b..49c9122 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Upgrading source files..." -ynh_setup_source --dest_dir="$install_dir" --full_replace +ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="config.json" #================================================= # REAPPLY SYSTEM CONFIGURATION