From 13b345bc39d282a6e6041dc022ea4092eedd8324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Tue, 16 Apr 2024 22:39:15 +0200 Subject: [PATCH 01/21] Use yarn 4.x --- manifest.toml | 3 --- scripts/_common.sh | 4 ++-- scripts/install | 10 +++++----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/manifest.toml b/manifest.toml index ceb7a0e..1362c1a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -132,9 +132,6 @@ ram.runtime = "50M" "python3-tabulate", "fontforge" ] - extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" - extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" - extras.yarn.packages = "yarn" [resources.database] type = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 3189b68..3963cfd 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,8 +5,8 @@ #================================================= nodejs_version=20 -current_hash="1eaf7b2b4" -version="1.19.3-10698-g1eaf7b2b4" +current_hash="41cdd245" +version="2.0.0-10698-g41cdd245" build_date="Mon, 18 Sep 2023 09:14:03 +0000" #================================================= diff --git a/scripts/install b/scripts/install index fe45893..bf7b974 100644 --- a/scripts/install +++ b/scripts/install @@ -64,18 +64,18 @@ chmod -R o-rwx "$install_dir" ynh_script_progression --message="Building frontend..." --weight=5 pushd $install_dir/build/frontend + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile # ynh_exec_warn_less ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:assets - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:styles - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp clean:dist - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:copy + + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run compile ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html" ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html" - echo "$version" > target/version.txt; + #echo "$version" > target/version.txt; popd mkdir -p $install_dir/frontend From ea7ec42f54739c63033bc50c3ebc13246cf408e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Tue, 16 Apr 2024 22:46:04 +0200 Subject: [PATCH 02/21] Properly activate corepack --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index bf7b974..53cbf18 100644 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,7 @@ chmod -R o-rwx "$install_dir" ynh_script_progression --message="Building frontend..." --weight=5 pushd $install_dir/build/frontend + ynh_exec_warn_less env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile From becba725f2175023c5e16d98d2a23c18e2498c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Tue, 16 Apr 2024 23:02:19 +0200 Subject: [PATCH 03/21] Use production env --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 53cbf18..920e7c5 100644 --- a/scripts/install +++ b/scripts/install @@ -67,12 +67,12 @@ pushd $install_dir/build/frontend ynh_exec_warn_less env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable # ynh_exec_warn_less - ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run compile + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html" ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html" From 964fdd0025d472395b1342901df9d796ed4a4af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Tue, 16 Apr 2024 23:32:56 +0200 Subject: [PATCH 04/21] Fixup paths in frontend --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 920e7c5..9b9638e 100644 --- a/scripts/install +++ b/scripts/install @@ -74,13 +74,13 @@ pushd $install_dir/build/frontend ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile - ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html" - ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html" + ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html" + ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html" #echo "$version" > target/version.txt; popd mkdir -p $install_dir/frontend -mv $install_dir/build/frontend/target/dist/* $install_dir/frontend +mv $install_dir/build/frontend/resources/public/* $install_dir/frontend chown -R $app:www-data $install_dir/frontend chmod -R 750 $install_dir/frontend From c7d9179ba48403c0d1ec672d3b78df6debfeb886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Tue, 16 Apr 2024 23:40:03 +0200 Subject: [PATCH 05/21] Fixup backend and exporter --- scripts/install | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 9b9638e..f19c450 100644 --- a/scripts/install +++ b/scripts/install @@ -90,6 +90,7 @@ pushd $install_dir/build/backend mkdir -p target/classes; mkdir -p target/dist; echo "$version" > target/classes/version.txt; + cp ../CHANGES.md target/classes/changelog.md; chown -R $app:$app target ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar; @@ -112,7 +113,11 @@ chmod -R 700 $install_dir/backend ynh_script_progression --message="Building exporter..." --weight=5 pushd $install_dir/build/exporter + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable + ynh_secure_remove --file="target" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main + ynh_secure_remove --file="target/app" + cp ../.yarnrc.yml target/ cp yarn.lock target/ cp package.json target/ @@ -127,8 +132,8 @@ chmod -R 700 $install_dir/exporter ynh_secure_remove --file=$install_dir/.cache pushd $install_dir/exporter - ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile - ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium + ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable + ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium popd ynh_script_progression --message="Cleaning up..." --weight=1 From a7eecf090fc143e0feb1a932fabe896e2fd06894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Wed, 17 Apr 2024 00:06:32 +0200 Subject: [PATCH 06/21] Activate corepack for exporter as well --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index f19c450..2fb0c08 100644 --- a/scripts/install +++ b/scripts/install @@ -132,6 +132,7 @@ chmod -R 700 $install_dir/exporter ynh_secure_remove --file=$install_dir/.cache pushd $install_dir/exporter + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium popd From 79ed31840b117727ea8da955f8bf7ada01de6499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Wed, 17 Apr 2024 00:12:12 +0200 Subject: [PATCH 07/21] Even more corepack activation --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 2fb0c08..d342534 100644 --- a/scripts/install +++ b/scripts/install @@ -113,6 +113,7 @@ chmod -R 700 $install_dir/backend ynh_script_progression --message="Building exporter..." --weight=5 pushd $install_dir/build/exporter + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable ynh_secure_remove --file="target" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main From 5ca3da3a116910fb9c3958c7cc99ebc2643cd2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Thu, 18 Apr 2024 00:06:42 +0200 Subject: [PATCH 08/21] Patch out PostgreSQL 14+ syntax --- sources/patches/main-002.patch | Bin 0 -> 9702 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sources/patches/main-002.patch diff --git a/sources/patches/main-002.patch b/sources/patches/main-002.patch new file mode 100644 index 0000000000000000000000000000000000000000..8d35a55e8cb437953f799cc11b68e5b5f9719217 GIT binary patch literal 9702 zcmeI2TTk0C6oAk3r2U7y0pi-rXsf+Yu0vyhfN9%Pl{PJ7T zDN__R@h$c_$H)F^JAeNKav?1)PnNmPiFFA3vMP1%4f!rjxt4(Vt+a`+lKO*dRjw#| zPMXgf7ji?XTT|+%T=HC#9KSMkUXd5@Y*Ffx+LkH*RqjZy^Nw#)HO(ik`76|;b$G;| zUy9fA3JKK$P5EtPDiL0jH%J#?j}r2(5YyC#~Y}vPpc0u=B0j5Z_W=J#$rMo6D13 zIiiLg*_S;zB>tZ87oPL@WRrfpp#N&z16d$dOYZX1=b>zIKPB~+mTrvqpYu+Qa9zF; zYLGtPdw09{?nzJDx5gX1?%jDsmDU34RX@{F;Kr24SZh;zr(3rjY1W^%j7(Ky5zpvk zr9H+fRU@fd>BQ){XEeB9e{E>}H8kp&(QQ3tn_7JtP)-;U`LHn)=&3{&GkEw&~q#EMCK}wC}a|ud)BU%#n9zJmQvl=5hMXF@8Mi z&^MdLhxfbf%^6GE{5k4gFuAIED4!iG_C7uN)Nc;uBbGlfQmH)YvZ=ycGmK3>cGoej z%<3Q2)8|%N5~^+cnN~3KY>`=S-H>eEFs;BG+~lWZD-g=jLuoTDO^uW0U7E6nEUfgg zP{Z+982a)cp`Oaga6TMONmni-;vm&0A!3}qoE=)mkvb!35~QCtNtFr1NE-f^zR%IL z)_O_E5~X9&tmx_xu+G1=3XIehUxQeSm0j7a@=BzqO~<5kOO}I4N#%%_$DVHWXTx!b z7y8^F@4|n#slKu3W~pr?Ty#UYiw)JtSYotCz{Ed>^mu?ur}BY3@Vj*c%Kv zIlkQ}hw`k$>hLCDMW(xtYlcHUT*^bD97HPfY)*kg@%2cWIq@ZMd@1$lqM`9@8SJMx z9MQd+7Heu9Bf7JrJ9s`j4&%7u%4J-cj4OjZ_Ph)klqKWE%j89&Z{BvJQ_r(>*SbUA zFUED79W}ojPwy-%$4*?xkjZ3;a;4rqvGO5`62z`=lr$RG6RZ}rNq_e*DczE0O)?gD z{8264`o@OGGsyLGt><&Kh|k60QdryQy*pPf55(TrS2@HiAFsB56a^$4Hw-!f(qzMzJ?T{l&*voz+v4r(J w^M!=vz~tW)EOPoijgx*i_t+WGi=67~d2~8oGI)G3qF-~2I_r0`{XetcKbt2U;{X5v literal 0 HcmV?d00001 From c1f17c156a0549b5f4cd8eeb4f8b831a6f0df9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Thu, 18 Apr 2024 00:19:39 +0200 Subject: [PATCH 09/21] Use LF x_x --- sources/patches/main-002.patch | Bin 9702 -> 9542 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sources/patches/main-002.patch b/sources/patches/main-002.patch index 8d35a55e8cb437953f799cc11b68e5b5f9719217..dc80253ba6b15c3670bdcef320a1dd96e36e8a0c 100644 GIT binary patch delta 464 zcmaFneavfv660hQMwiKU96=KkY$ku=511HdH@S-`YO;~I)?@+ZG-fUag~=C{ttUxj zOcoL)SksEsAmS4|b3#t3XCf?&FA>JdLvqY=#9_ z0J<6XIQ1BBc%@;p(9aUiiz{6UjJVlTuzfJSzqx-)C? z6$t^Tk!q6@Bu!9^+#n5cVV{iC!0LcE>xTRN8SU) zI1XhkpbLv87b!uE0`Wnv<5Jd`yg^xE@+D=f$)DtkSgjdA@o}Cj6&Q3NQ#dBesDguz HiHiXMYlENn delta 641 zcmX@+^~`&N5+ft;WJN|-ASuruI5Ex+$XKWZWi&EH1G)aP+LPIs)7W_#xEK@|cqb={ zTLVSsb7cZaL6%M+St}6?Bm-5{C!Z7Ink>U=0pvCE%mD&#B&%7g3_;tIfFXZd6U9vxP59VaWWs@IiTom zK8TG|f$W7!!9Y Date: Thu, 18 Apr 2024 00:28:16 +0200 Subject: [PATCH 10/21] Fixed encoding x_x --- sources/patches/main-002.patch | Bin 9542 -> 4770 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sources/patches/main-002.patch b/sources/patches/main-002.patch index dc80253ba6b15c3670bdcef320a1dd96e36e8a0c..313ab6d9e79258173f35adeeeea92a5af51ecad6 100644 GIT binary patch literal 4770 zcmds*O>^2X5Qgvm6?+2)WNa{&nOs6ZNtjZ|7&>iF9@&zqTQI2+o&Nkv#`$P4#fD5L zfrIgf^saX0$GZ}X!VnOeM*?Wmr@;>%v*tPpn)Lp@xs2us711hQH`hNGO~W)Cv|KS1 zMhlL_x6RUzX|zCs`U|eh7T}*Op+zy{zrn}M==dzay57MoXtlZl1=BEW%hC`+uP|1v zUa!B#crPyjnN9;kT^=2fm%Y)9xG?KojR>end5@9O0H8M*!1cr>!<#XDAYY-ngIfvBpd1NGEZsuvn)a?TL+7z4%^Tul+&Co3V_%2N&X zUDBHon7C5&Zq(}&n7PB78#%0p=H63t&lB@Rs}J1C-D9)iHIOgE>1?{U14xs9dv~GL zGrI?k!4*+4kUouw8t3?hl!_3LUjG)RGwH}jGM=f}eZD1Qs8)kblJHn~Yc50-&#RSW zv*2qz$F)iWM6%&E7|MQ?RV=S7m0C>(M#*h|N6AfL{Ao0*)ihR)pYAh$=zPu@+RpIN zG?fv|*lL@OMePo@b-j%_#;ncFvTT(yTa>g?qA7RXl)LUe?$QWn3>}~_eU)E8sP4UO z^zt2i1rYOv&lOA4c)~LM96wT7CbJz@$pEyvfzSP*D*+7r&~gj|cS{0Tz*a%(3MeVm zT82VR9`jS&Hi>P&Ww}}IUGnwZtJ9%+u6DL0wNjE~aiJ!>TxDqP>6=m0V!p$0$2WAH z@>XaDPRPqrv(G|NR`&H*gkS{--sK~UMJ^SLhjg?Z6Uv<8JBDM}pzMK41lYzM+iL4N3+=$fhH010 tCb{xO5y|bGQqi#FUP7ZIw-Wxn%0Fhsu3j3seQ?D7!0wV=Y5j+H?hihz7S;d& literal 9542 zcmeI2TT>b_6oAh&zhd9O@y4wJ(-%?EI<@GiowiTRaCg+@-VK67^6R|gnq19uNo)BQ?Pwbg>6e!x zfqbfeOMV-P3dGa$2HBceqkyzqq%^l7Swe}YOHI{2EjyAYB+yyIa@aK?>n1FVeRpLS z%WPt?qHJJE2kE?ck+@e{mJ_*@iky>kDP`FsT_J9Lsy4=_5|nEw%K^cWLpkOBiX6+4 zR7t-l{)J}>Pi!%M*Nj_@@20Ggt2Gb#=(8&Od|!~;rJsA_^H;o6BVLzp#2VzM2JapW z-aQ}4`W7#6%*XmdnVy>Dsc)&@+gao=yE?So>$mI8E%l*&BTd;@!ZF%-a-Lz0vXN1( zb8a*|GO|Bzy*9S>8oKn%Y*z0$pp8>GL$=Y@jO1~sQlA< zT5Eko-%(k@_N(^aGb7{qfrFkE<45XQYESiwNm5xKQVXcP-%($!;El)!a;v1Q-+iK7 zbJW99c*p~z+F?xZuyhSi(h=7&zr*e+NmBM;{GiKuDf>Abn&eJ@Tr^_QxA#OfzTrUaVC$)6IlW*mQ9Y_2m{ximb77tf}+Bn)yZ zXI9iaE8LEu)sEp-j@7osN9mO#mSJ?_c zlbw~G6s8SpT-cL^HW{c>F=A}Gg-39pR_xuLb$&PBan(sSh=Wxtrk9nKZqemcIp zr3~k0J}2grCCH9?{|3p08cGRopQ1F;wB9JSAxhjQb Date: Thu, 18 Apr 2024 00:32:48 +0200 Subject: [PATCH 11/21] Update main-002.patch --- sources/patches/main-002.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/patches/main-002.patch b/sources/patches/main-002.patch index 313ab6d..e28a692 100644 --- a/sources/patches/main-002.patch +++ b/sources/patches/main-002.patch @@ -1,5 +1,5 @@ diff --git a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql -index b7d05bdc7..57dc229ca 100644 +index b7d05bdc7..57dc229ca 100645 --- a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql +++ b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql @@ -18,7 +18,8 @@ ALTER TABLE file_thumbnail From dcf643f0937ee6a12a9ca374849918e5b17b5576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Thu, 18 Apr 2024 00:57:19 +0200 Subject: [PATCH 12/21] Added missing diff --- sources/patches/main-002.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/patches/main-002.patch b/sources/patches/main-002.patch index e28a692..a442bf4 100644 --- a/sources/patches/main-002.patch +++ b/sources/patches/main-002.patch @@ -74,7 +74,9 @@ index 8c7675643..df6c17016 100644 +++ b/backend/src/app/migrations/sql/0114-mod-team-table.sql @@ -1,4 +1,5 @@ --- Add deletion protection +-CREATE OR REPLACE TRIGGER deletion_protection__tgr +DROP TRIGGER IF EXISTS deletion_protection__tgr on team; ++CREATE TRIGGER deletion_protection__tgr CREATE OR REPLACE TRIGGER deletion_protection__tgr BEFORE DELETE ON team FOR EACH STATEMENT WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR From 9d4742ed6122e93dae9890eb37ba91178db83ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Thu, 18 Apr 2024 22:54:44 +0200 Subject: [PATCH 13/21] TMP --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d342534..4040591 100644 --- a/scripts/install +++ b/scripts/install @@ -113,11 +113,11 @@ chmod -R 700 $install_dir/backend ynh_script_progression --message="Building exporter..." --weight=5 pushd $install_dir/build/exporter - ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate +ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable ynh_secure_remove --file="target" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main - ynh_secure_remove --file="target/app" + #ynh_secure_remove --file="target/app" cp ../.yarnrc.yml target/ cp yarn.lock target/ cp package.json target/ @@ -142,7 +142,7 @@ ynh_script_progression --message="Cleaning up..." --weight=1 ynh_secure_remove --file=$install_dir/.npm ynh_secure_remove --file=$install_dir/.yarn -ynh_secure_remove --file=$install_dir/build +#ynh_secure_remove --file=$install_dir/build ynh_secure_remove --file=$install_dir/.m2 ynh_secure_remove --file=$install_dir/.clojure ynh_secure_remove --file=$install_dir/clojure From bad213eb585ca76007895b1c35fd25b799faa1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Thu, 18 Apr 2024 23:44:01 +0200 Subject: [PATCH 14/21] STFU corepack --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 4040591..557ac5e 100644 --- a/scripts/install +++ b/scripts/install @@ -64,10 +64,10 @@ chmod -R o-rwx "$install_dir" ynh_script_progression --message="Building frontend..." --weight=5 pushd $install_dir/build/frontend - ynh_exec_warn_less env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable + ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable # ynh_exec_warn_less ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" From b3b7b6d3c2e50a79de14c9d37afd792e1df7fff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Fri, 19 Apr 2024 00:26:42 +0200 Subject: [PATCH 15/21] tmp --- scripts/install | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 557ac5e..7846c96 100644 --- a/scripts/install +++ b/scripts/install @@ -140,17 +140,17 @@ popd ynh_script_progression --message="Cleaning up..." --weight=1 -ynh_secure_remove --file=$install_dir/.npm -ynh_secure_remove --file=$install_dir/.yarn +# ynh_secure_remove --file=$install_dir/.npm +# ynh_secure_remove --file=$install_dir/.yarn #ynh_secure_remove --file=$install_dir/build -ynh_secure_remove --file=$install_dir/.m2 -ynh_secure_remove --file=$install_dir/.clojure -ynh_secure_remove --file=$install_dir/clojure -ynh_secure_remove --file=$install_dir/babashka -ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* -ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* -ynh_secure_remove --file=$install_dir/.cache/yarn -ynh_secure_remove --file=$install_dir/.cache/node +# ynh_secure_remove --file=$install_dir/.m2 +# ynh_secure_remove --file=$install_dir/.clojure +# ynh_secure_remove --file=$install_dir/clojure +# ynh_secure_remove --file=$install_dir/babashka +# ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* +# ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* +# ynh_secure_remove --file=$install_dir/.cache/yarn +# ynh_secure_remove --file=$install_dir/.cache/node #================================================= # SYSTEM CONFIGURATION From 631b168867ea2b3cf8120b1b1345482b4209391a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Fri, 19 Apr 2024 23:04:32 +0200 Subject: [PATCH 16/21] Fix exporter? --- scripts/install | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/install b/scripts/install index 7846c96..5672e44 100644 --- a/scripts/install +++ b/scripts/install @@ -117,8 +117,6 @@ ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable ynh_secure_remove --file="target" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main - #ynh_secure_remove --file="target/app" - cp ../.yarnrc.yml target/ cp yarn.lock target/ cp package.json target/ @@ -127,6 +125,7 @@ popd mkdir -p $install_dir/exporter mv $install_dir/build/exporter/target/* $install_dir/exporter +cp $install_dir/build/exporter/.yarnrc.yml $install_dir/exporter chown -R $app:$app $install_dir/exporter chmod -R 700 $install_dir/exporter @@ -140,17 +139,17 @@ popd ynh_script_progression --message="Cleaning up..." --weight=1 -# ynh_secure_remove --file=$install_dir/.npm -# ynh_secure_remove --file=$install_dir/.yarn -#ynh_secure_remove --file=$install_dir/build -# ynh_secure_remove --file=$install_dir/.m2 -# ynh_secure_remove --file=$install_dir/.clojure -# ynh_secure_remove --file=$install_dir/clojure -# ynh_secure_remove --file=$install_dir/babashka -# ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* -# ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* -# ynh_secure_remove --file=$install_dir/.cache/yarn -# ynh_secure_remove --file=$install_dir/.cache/node +ynh_secure_remove --file=$install_dir/.npm +ynh_secure_remove --file=$install_dir/.yarn +ynh_secure_remove --file=$install_dir/build +ynh_secure_remove --file=$install_dir/.m2 +ynh_secure_remove --file=$install_dir/.clojure +ynh_secure_remove --file=$install_dir/clojure +ynh_secure_remove --file=$install_dir/babashka +ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* +ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* +ynh_secure_remove --file=$install_dir/.cache/yarn +ynh_secure_remove --file=$install_dir/.cache/node #================================================= # SYSTEM CONFIGURATION From f8572a3080b331bc5bffab953193b7a3df40d1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Fri, 19 Apr 2024 23:22:49 +0200 Subject: [PATCH 17/21] Fix TYPO --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 5672e44..fba7803 100644 --- a/scripts/install +++ b/scripts/install @@ -125,7 +125,7 @@ popd mkdir -p $install_dir/exporter mv $install_dir/build/exporter/target/* $install_dir/exporter -cp $install_dir/build/exporter/.yarnrc.yml $install_dir/exporter +cp $install_dir/build/.yarnrc.yml $install_dir/exporter chown -R $app:$app $install_dir/exporter chmod -R 700 $install_dir/exporter From 23398539c40b0b4f9b7d6a2374ed1cf9a5e18515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Sat, 20 Apr 2024 00:10:51 +0200 Subject: [PATCH 18/21] Upgrade? --- scripts/install | 2 +- scripts/upgrade | 180 +++++++++++++++++++++++++----------------------- 2 files changed, 94 insertions(+), 88 deletions(-) diff --git a/scripts/install b/scripts/install index fba7803..bc16eeb 100644 --- a/scripts/install +++ b/scripts/install @@ -113,7 +113,7 @@ chmod -R 700 $install_dir/backend ynh_script_progression --message="Building exporter..." --weight=5 pushd $install_dir/build/exporter -ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable ynh_secure_remove --file="target" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main diff --git a/scripts/upgrade b/scripts/upgrade index fb90d48..6bc2e7a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,116 +36,122 @@ ynh_use_nodejs if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk" - export JAVA_HOME=$install_dir/jdk + ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk" + export JAVA_HOME=$install_dir/jdk - chown -R $app:www-data "$install_dir" - tmp_dir=$(mktemp -d) + chown -R $app:www-data "$install_dir" + tmp_dir=$(mktemp -d) - pushd $tmp_dir - curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh - chmod +x linux-install.sh - ynh_exec_warn_less ./linux-install.sh -p $install_dir/clojure - popd + pushd $tmp_dir + curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh + chmod +x linux-install.sh + ynh_exec_warn_less ./linux-install.sh -p $install_dir/clojure + popd - ynh_secure_remove --file=$tmp_dir + ynh_secure_remove --file=$tmp_dir - ynh_setup_source --dest_dir="$install_dir/babashka" --source_id="babashka" + ynh_setup_source --dest_dir="$install_dir/babashka" --source_id="babashka" - export PATH=$JAVA_HOME/bin:$install_dir/clojure/bin:$install_dir/babashka:$PATH + export PATH=$JAVA_HOME/bin:$install_dir/clojure/bin:$install_dir/babashka:$PATH - ynh_script_progression --message="Upgrading source files..." + ynh_script_progression --message="Upgrading source files..." - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir/build" - chmod -R o-rwx "$install_dir" - chown -R $app:www-data "$install_dir" + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$install_dir/build" + chmod -R o-rwx "$install_dir" + chown -R $app:www-data "$install_dir" - ynh_script_progression --message="Building frontend..." --weight=5 + ynh_script_progression --message="Building frontend..." --weight=5 - pushd $install_dir/build/frontend - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile - - # ynh_exec_warn_less - ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:assets - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:styles - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp clean:dist - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build:copy + pushd $install_dir/build/frontend + ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable + + # ynh_exec_warn_less + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" - ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html" - ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html" - echo "$version" > target/version.txt; - popd + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile - ynh_secure_remove --file=$install_dir/frontend - mkdir -p $install_dir/frontend - mv $install_dir/build/frontend/target/dist/* $install_dir/frontend - chown -R $app:www-data $install_dir/frontend - chmod -R 755 $install_dir/frontend + ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html" + ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html" + popd - ynh_script_progression --message="Building backend..." --weight=5 + ynh_secure_remove --file=$install_dir/frontend + mkdir -p $install_dir/frontend + mv $install_dir/build/frontend/target/dist/* $install_dir/frontend + chown -R $app:www-data $install_dir/frontend + chmod -R 755 $install_dir/frontend - pushd $install_dir/build/backend - mkdir -p target/classes; - mkdir -p target/dist; - echo "$version" > target/classes/version.txt; - chown -R $app:$app target + ynh_script_progression --message="Building backend..." --weight=5 - ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar; - mv target/penpot.jar target/dist/penpot.jar - cp resources/log4j2.xml target/dist/log4j2.xml - cp scripts/run.template.sh target/dist/run.sh - chmod +x target/dist/run.sh; + pushd $install_dir/build/backend + mkdir -p target/classes; + mkdir -p target/dist; + echo "$version" > target/classes/version.txt; + cp ../CHANGES.md target/classes/changelog.md; + chown -R $app:$app target - # Prefetch templates - mkdir builtin-templates; - bb ./scripts/prefetch-templates.clj resources/app/onboarding.edn builtin-templates/ - cp -r builtin-templates target/dist/ - popd + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar; + mv target/penpot.jar target/dist/penpot.jar + cp resources/log4j2.xml target/dist/log4j2.xml + cp scripts/run.template.sh target/dist/run.sh + chmod +x target/dist/run.sh; - ynh_secure_remove --file=$install_dir/backend - mkdir -p $install_dir/backend - mv $install_dir/build/backend/target/dist/* $install_dir/backend - chown -R $app:$app $install_dir/backend - chmod -R 700 $install_dir/backend + # Prefetch templates + mkdir builtin-templates; + bb ./scripts/prefetch-templates.clj resources/app/onboarding.edn builtin-templates/ + cp -r builtin-templates target/dist/ + popd - ynh_script_progression --message="Building exporter..." --weight=5 + ynh_secure_remove --file=$install_dir/backend + mkdir -p $install_dir/backend + mv $install_dir/build/backend/target/dist/* $install_dir/backend + chown -R $app:$app $install_dir/backend + chmod -R 700 $install_dir/backend - pushd $install_dir/build/exporter - ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main - cp yarn.lock target/ - cp package.json target/ - - ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js" - popd + ynh_script_progression --message="Building exporter..." --weight=5 - ynh_secure_remove --file=$install_dir/exporter - mkdir -p $install_dir/exporter - mv $install_dir/build/exporter/target/* $install_dir/exporter - chown -R $app:$app $install_dir/exporter - chmod -R 700 $install_dir/exporter + pushd $install_dir/build/exporter + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable + ynh_secure_remove --file="target" + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main + cp yarn.lock target/ + cp package.json target/ + + ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js" + popd - ynh_secure_remove --file=$install_dir/.cache + ynh_secure_remove --file=$install_dir/exporter + mkdir -p $install_dir/exporter + mv $install_dir/build/exporter/target/* $install_dir/exporter + cp $install_dir/build/.yarnrc.yml $install_dir/exporter + chown -R $app:$app $install_dir/exporter + chmod -R 700 $install_dir/exporter - pushd $install_dir/exporter - ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile - ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium - popd + ynh_secure_remove --file=$install_dir/.cache - ynh_script_progression --message="Cleaning up..." --weight=1 + pushd $install_dir/exporter + ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate + ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable + ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium + popd - ynh_secure_remove --file=$install_dir/.npm - ynh_secure_remove --file=$install_dir/.yarn - ynh_secure_remove --file=$install_dir/build - ynh_secure_remove --file=$install_dir/.m2 - ynh_secure_remove --file=$install_dir/.clojure - ynh_secure_remove --file=$install_dir/clojure - ynh_secure_remove --file=$install_dir/babashka - ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* - ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* - ynh_secure_remove --file=$install_dir/.cache/yarn - ynh_secure_remove --file=$install_dir/.cache/node + ynh_script_progression --message="Cleaning up..." --weight=1 + + ynh_secure_remove --file=$install_dir/.npm + ynh_secure_remove --file=$install_dir/.yarn + ynh_secure_remove --file=$install_dir/build + ynh_secure_remove --file=$install_dir/.m2 + ynh_secure_remove --file=$install_dir/.clojure + ynh_secure_remove --file=$install_dir/clojure + ynh_secure_remove --file=$install_dir/babashka + ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-* + ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-* + ynh_secure_remove --file=$install_dir/.cache/yarn + ynh_secure_remove --file=$install_dir/.cache/node fi #================================================= From db38c00d32df921170c2ca70c5aa88af9e23983d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Sat, 20 Apr 2024 00:31:54 +0200 Subject: [PATCH 19/21] Fixed upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6bc2e7a..2797fae 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,7 +80,7 @@ then ynh_secure_remove --file=$install_dir/frontend mkdir -p $install_dir/frontend - mv $install_dir/build/frontend/target/dist/* $install_dir/frontend + mv $install_dir/build/frontend/resources/public/* $install_dir/frontend chown -R $app:www-data $install_dir/frontend chmod -R 755 $install_dir/frontend From 4c20708f1d7938b5c182f17a849955a6091b487d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Sat, 20 Apr 2024 01:18:32 +0200 Subject: [PATCH 20/21] Another fix for upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2797fae..375258c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,7 +136,7 @@ then pushd $install_dir/exporter ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable - ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium + ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium popd ynh_script_progression --message="Cleaning up..." --weight=1 From 663a2561887f118e4ec1c86d181af117b0c21aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szyma=C5=84ski?= Date: Sat, 20 Apr 2024 01:36:22 +0200 Subject: [PATCH 21/21] Add rsync dependency --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1362c1a..556fb99 100644 --- a/manifest.toml +++ b/manifest.toml @@ -130,7 +130,8 @@ ram.runtime = "50M" "woff2", "python3", "python3-tabulate", - "fontforge" + "fontforge", + "rsync" ] [resources.database]