From 1187226ebad300ec481ce9e0419f38edd72f1382 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 3 Feb 2023 01:14:13 +0700 Subject: [PATCH 01/44] Update app-06-logo.patch --- sources/patches/app-06-logo.patch | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch index 08e50cf..64306d2 100644 --- a/sources/patches/app-06-logo.patch +++ b/sources/patches/app-06-logo.patch @@ -1,13 +1,16 @@ diff --git a/app/components/Icons/OutlineIcon.tsx b/app/components/Icons/OutlineIcon.tsx -index 05fa32927..15c06887b 100644 +index 05fa32927..33fc7ee21 100644 --- a/app/components/Icons/OutlineIcon.tsx +++ b/app/components/Icons/OutlineIcon.tsx -@@ -22,7 +22,7 @@ export default function OutlineIcon({ +@@ -22,7 +22,10 @@ export default function OutlineIcon({ viewBox={cover ? "2 2 20 20" : "0 0 24 24"} version="1.1" > - -+ ++ ); } \ No newline at end of file From 36eff0b786836e16ae18a028fa7096c877aad0c5 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Feb 2023 23:19:39 +0700 Subject: [PATCH 02/44] Fix MinIO bucket access policy for better safety --- conf/policy.json | 20 ++++++++++++++++++++ scripts/install | 5 ++++- scripts/restore | 8 ++++++-- scripts/upgrade | 12 ++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 conf/policy.json diff --git a/conf/policy.json b/conf/policy.json new file mode 100644 index 0000000..7ffe219 --- /dev/null +++ b/conf/policy.json @@ -0,0 +1,20 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowPublicRead", + "Effect": "Allow", + "Principal": { + "AWS": [ + "*" + ] + }, + "Action": [ + "s3:GetObject" + ], + "Resource": [ + "arn:aws:s3:::outlinestorage/public/*" + ] + } + ] +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index f8b2395..ea97294 100755 --- a/scripts/install +++ b/scripts/install @@ -194,9 +194,12 @@ chown -R $app:www-data "$final_path" #================================================= ynh_script_progression --message="Setting up MinIO bucket for Outline..." --weight=1 +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" + pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json + ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage popd #================================================= diff --git a/scripts/restore b/scripts/restore index 3888fc9..19b1447 100755 --- a/scripts/restore +++ b/scripts/restore @@ -122,11 +122,15 @@ chown -R $app:www-data "$final_path" mv "$final_path/outlinestorage" "$mc_path/outlinestorage" chown -R minio:www-data "$mc_path/outlinestorage" + +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" + pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage - ynh_exec_warn_less sudo -u minio ./mc mirror --a ./outlinestorage/ minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json + ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage popd + ynh_secure_remove --file="$mc_path/outlinestorage" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1300fbd..42e4a7e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,18 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPDATE MINIO BUCKET +#================================================= +ynh_script_progression --message="Updating outlinestorage MinIO bucket access policy..." --weight=1 + +ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" + +pushd "$mc_path" + ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json + ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage +popd + #================================================= # NGINX CONFIGURATION #================================================= From 156e8a08a76842c631270a231a59623df90e3af3 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Feb 2023 23:25:06 +0700 Subject: [PATCH 03/44] Bump to v0.68.0 --- conf/app.src | 4 ++-- doc/DISCLAIMER.md | 2 +- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index ebaaf08..4d06b13 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/21ce145f67b26cd7c4493258c65b5d1731b23a79.zip -SOURCE_SUM=610604b495a7972fd5140d14d53b8e1b891e9caf0aec53856cbe229f5c76eb77 +SOURCE_URL=https://github.com/outline/outline/archive/12aca51541ae07303767ef5cf5d66d21426de0e0.zip +SOURCE_SUM=888e52779b6a454288b9e7ccd072e4657c6a6bc70827c1844f394613d8b0fc74 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index a544695..a08ae4b 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,7 +1,7 @@ ### Not totally free licence Outline is a softwared licenced under [BUSL 1.1 licence](https://spdx.org/licenses/BUSL-1.1.html). ⚠️ That licence **is not totally free**. Please read it very carefully if you have any commercial use in mind. -The Outline version shipped with this package (v0.65.2) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE). +The Outline version shipped with this package (v0.68.0) will be released under Apache-2.0 licence [after May 23rd 2026](https://github.com/outline/outline/blob/151c2c731a94eefdda4e62f311308e9bd4615838/LICENSE). ### Known limitations diff --git a/manifest.json b/manifest.json index a83b23a..7996e1b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Wiki and knowledge base for teams", "fr": "Wiki et base de connaissances pour les équipes" }, - "version": "0.67.2~ynh1", + "version": "0.68.0~ynh1", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", From 24b861c03a937ea80c3b16964eda8fc322034b2a Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Feb 2023 23:44:51 +0700 Subject: [PATCH 04/44] Update patches --- sources/patches/app-02-email.patch | 4 ++-- sources/patches/app-03-visitor.patch | 12 ++++++------ sources/patches/app-04-bible.patch | 4 ++-- sources/patches/app-06-logo.patch | 16 ---------------- 4 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 sources/patches/app-06-logo.patch diff --git a/sources/patches/app-02-email.patch b/sources/patches/app-02-email.patch index 475ab66..dbb8633 100644 --- a/sources/patches/app-02-email.patch +++ b/sources/patches/app-02-email.patch @@ -1,8 +1,8 @@ diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx -index 0d4dea367..5857ccb8a 100644 +index 5df80a051..4e32de826 100644 --- a/server/emails/mailer.tsx +++ b/server/emails/mailer.tsx -@@ -123,6 +123,7 @@ export class Mailer { +@@ -122,6 +122,7 @@ export class Mailer { : { rejectUnauthorized: false, }, diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 7aeb1a7..6f9095c 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -67,10 +67,10 @@ index 000000000..be344d2e2 + +export default router; diff --git a/yarn.lock b/yarn.lock -index 67d407ca7..150665e94 100644 +index 352d1993a..5e3c24636 100644 --- a/yarn.lock +++ b/yarn.lock -@@ -12100,6 +12100,14 @@ passport-oauth@1.0.x: +@@ -10760,6 +10760,14 @@ passport-oauth@1.0.x: passport-oauth1 "1.x.x" passport-oauth2 "1.x.x" @@ -85,7 +85,7 @@ index 67d407ca7..150665e94 100644 passport-slack-oauth2@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.1.1.tgz#d831ffc3f1e968fcc3622e6ecf41643c8d8f9cbc" -@@ -12122,6 +12130,14 @@ passport@^0.6.0: +@@ -10782,6 +10790,14 @@ passport@^0.6.0: pause "0.0.1" utils-merge "^1.0.1" @@ -100,7 +100,7 @@ index 67d407ca7..150665e94 100644 passthrough-counter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/passthrough-counter/-/passthrough-counter-1.0.0.tgz#1967d9e66da572b5c023c787db112a387ab166fa" -@@ -12348,6 +12364,11 @@ pkg-up@^3.1.0: +@@ -11005,6 +11021,11 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" @@ -113,10 +113,10 @@ index 67d407ca7..150665e94 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index d64914567..ca674a5cd 100644 +index 787991dc1..7d610c010 100644 --- a/package.json +++ b/package.json -@@ -145,6 +145,7 @@ +@@ -150,6 +150,7 @@ "passport": "^0.6.0", "passport-google-oauth2": "^0.2.0", "passport-oauth2": "^1.6.1", diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 1d5ab5a..1018614 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -1,5 +1,5 @@ diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx -index 42269b5e4..c40350908 100644 +index 42269b5e4..174c84c02 100644 --- a/app/editor/menus/block.tsx +++ b/app/editor/menus/block.tsx @@ -19,6 +19,7 @@ import { @@ -18,7 +18,7 @@ index 42269b5e4..c40350908 100644 + name: "container_notice", + title: dictionary.bibleNotice, + icon: , -+ keywords: "notice card suggestion", ++ keywords: "notice card bible", + attrs: { style: "bible" }, + }, { diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch deleted file mode 100644 index 64306d2..0000000 --- a/sources/patches/app-06-logo.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/app/components/Icons/OutlineIcon.tsx b/app/components/Icons/OutlineIcon.tsx -index 05fa32927..33fc7ee21 100644 ---- a/app/components/Icons/OutlineIcon.tsx -+++ b/app/components/Icons/OutlineIcon.tsx -@@ -22,7 +22,10 @@ export default function OutlineIcon({ - viewBox={cover ? "2 2 20 20" : "0 0 24 24"} - version="1.1" - > -- -+ - - ); - } \ No newline at end of file From eb6e1ac6c508557dd46d4fb3cb5e2ed107f90db4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Feb 2023 23:53:13 +0700 Subject: [PATCH 05/44] Fix MinIO policy file ownership --- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index ea97294..4fca190 100755 --- a/scripts/install +++ b/scripts/install @@ -195,6 +195,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Setting up MinIO bucket for Outline..." --weight=1 ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" diff --git a/scripts/restore b/scripts/restore index 19b1447..bf8afa0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -124,6 +124,7 @@ mv "$final_path/outlinestorage" "$mc_path/outlinestorage" chown -R minio:www-data "$mc_path/outlinestorage" ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" diff --git a/scripts/upgrade b/scripts/upgrade index 42e4a7e..52215d0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,6 +101,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Updating outlinestorage MinIO bucket access policy..." --weight=1 ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json From 6f14d06d7b80ad94b00758dcc877f1682c0f50d0 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 00:31:48 +0700 Subject: [PATCH 06/44] fix set policy --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 4fca190..a39a125 100755 --- a/scripts/install +++ b/scripts/install @@ -200,7 +200,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline popd #================================================= diff --git a/scripts/restore b/scripts/restore index bf8afa0..4d1e0a3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -129,7 +129,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline popd ynh_secure_remove --file="$mc_path/outlinestorage" diff --git a/scripts/upgrade b/scripts/upgrade index 52215d0..da115ac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set outline minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline popd #================================================= From e7ec4bfd6db88df0a6652a2793658882bba92441 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 00:38:36 +0700 Subject: [PATCH 07/44] Still wrong... --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index a39a125..7a9df8d 100755 --- a/scripts/install +++ b/scripts/install @@ -200,7 +200,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline popd #================================================= diff --git a/scripts/restore b/scripts/restore index 4d1e0a3..9350a0d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -129,7 +129,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline popd ynh_secure_remove --file="$mc_path/outlinestorage" diff --git a/scripts/upgrade b/scripts/upgrade index da115ac..c1a4101 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio/outlinestorage outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline popd #================================================= From 6397b92c22d8c9ffbd05be2328329a9b7ef8f21d Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 00:44:39 +0700 Subject: [PATCH 08/44] policy needs user --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7a9df8d..43fc095 100755 --- a/scripts/install +++ b/scripts/install @@ -200,7 +200,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" popd #================================================= diff --git a/scripts/restore b/scripts/restore index 9350a0d..f026728 100755 --- a/scripts/restore +++ b/scripts/restore @@ -129,7 +129,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" popd ynh_secure_remove --file="$mc_path/outlinestorage" diff --git a/scripts/upgrade b/scripts/upgrade index c1a4101..249d003 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline + ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" popd #================================================= From 8a0d8b83c71468747054370df022fd55b65e449e Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 01:09:45 +0700 Subject: [PATCH 09/44] Should be good --- scripts/install | 3 +-- scripts/restore | 3 +-- scripts/upgrade | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 43fc095..66693a1 100755 --- a/scripts/install +++ b/scripts/install @@ -199,8 +199,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage popd #================================================= diff --git a/scripts/restore b/scripts/restore index f026728..815c140 100755 --- a/scripts/restore +++ b/scripts/restore @@ -128,8 +128,7 @@ chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" - ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage popd ynh_secure_remove --file="$mc_path/outlinestorage" diff --git a/scripts/upgrade b/scripts/upgrade index 249d003..a160dea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,8 +104,7 @@ ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.j chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" - ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json - ynh_exec_warn_less sudo -u minio ./mc admin policy set minio outline user="$minio_admin" + ynh_exec_warn_less sudo -u minio ./mc anonymous set-json ./policy.json minio/outlinestorage popd #================================================= From d7149b2ee44c93aadce9182cabf04e6f29c13107 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 01:29:33 +0700 Subject: [PATCH 10/44] Test max old space size --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 66693a1..da04163 100755 --- a/scripts/install +++ b/scripts/install @@ -222,7 +222,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build --max_old_space_size=8000 2>&1 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 From e85af5ac0bf3dd3bc1c7c3490febfa6e017e2009 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 01:53:25 +0700 Subject: [PATCH 11/44] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index da04163..0eae34a 100755 --- a/scripts/install +++ b/scripts/install @@ -217,12 +217,13 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs + export NODE_OPTIONS="--max-old-space-size=2048" ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build --max_old_space_size=8000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 From 8a206ef3f7a662b97b2c3047364a72c32c0615ea Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 09:12:58 +0700 Subject: [PATCH 12/44] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0eae34a..5d8f06f 100755 --- a/scripts/install +++ b/scripts/install @@ -217,7 +217,7 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - export NODE_OPTIONS="--max-old-space-size=2048" + export NODE_OPTIONS=--max_old_space_size=1024 ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 From 17df9f3b83b18990fd7c7db827a76c266ba6ce0e Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 09:44:46 +0700 Subject: [PATCH 13/44] try --- scripts/install | 2 +- sources/patches/app-03-visitor.patch | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 5d8f06f..dbb8ce4 100755 --- a/scripts/install +++ b/scripts/install @@ -217,7 +217,7 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - export NODE_OPTIONS=--max_old_space_size=1024 + export NODE_OPTIONS=--max_old_space_size=1536 ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 6f9095c..18376e9 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -113,9 +113,18 @@ index 352d1993a..5e3c24636 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index 787991dc1..7d610c010 100644 +index 787991dc1..2191c20c2 100644 --- a/package.json +++ b/package.json +@@ -8,7 +8,7 @@ + "copy:i18n": "mkdir -p ./build/shared/i18n && cp -R ./shared/i18n/locales ./build/shared/i18n", + "build:i18n": "i18next --silent '{shared,app,server,plugins}/**/*.{ts,tsx}' && yarn copy:i18n", + "build:server": "./build.sh", +- "build": "yarn clean && yarn vite:build && yarn build:i18n && yarn build:server", ++ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1536' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1536' yarn build:server", + "start": "node ./build/server/index.js", + "dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"", + "dev:backend": "nodemon --exec \"yarn build:server && yarn dev\" -e js,ts,tsx --ignore build/ --ignore app/ --ignore shared/editor", @@ -150,6 +150,7 @@ "passport": "^0.6.0", "passport-google-oauth2": "^0.2.0", @@ -123,4 +132,4 @@ index 787991dc1..7d610c010 100644 + "passport-req": "^0.1.1", "passport-slack-oauth2": "^1.1.1", "pg": "^8.8.0", - "pg-hstore": "^2.3.4", + "pg-hstore": "^2.3.4", \ No newline at end of file From 926f38c84ce453283c95e62047f816cf87b0916a Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 11:20:10 +0700 Subject: [PATCH 14/44] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 18376e9..9dab630 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -113,7 +113,7 @@ index 352d1993a..5e3c24636 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index 787991dc1..2191c20c2 100644 +index 787991dc1..24ea2c8af 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ @@ -121,7 +121,7 @@ index 787991dc1..2191c20c2 100644 "build:i18n": "i18next --silent '{shared,app,server,plugins}/**/*.{ts,tsx}' && yarn copy:i18n", "build:server": "./build.sh", - "build": "yarn clean && yarn vite:build && yarn build:i18n && yarn build:server", -+ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1536' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1536' yarn build:server", ++ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1024' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1024' yarn build:server", "start": "node ./build/server/index.js", "dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"", "dev:backend": "nodemon --exec \"yarn build:server && yarn dev\" -e js,ts,tsx --ignore build/ --ignore app/ --ignore shared/editor", From ea40fccb49e5899e12bf7f30038230a9d2ed6739 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 11:42:10 +0700 Subject: [PATCH 15/44] bump to node 18 + increase to 3gb --- conf/app.src | 4 ++-- scripts/_common.sh | 2 +- sources/patches/app-03-visitor.patch | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index 4d06b13..8fa9cd8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/12aca51541ae07303767ef5cf5d66d21426de0e0.zip -SOURCE_SUM=888e52779b6a454288b9e7ccd072e4657c6a6bc70827c1844f394613d8b0fc74 +SOURCE_URL=https://github.com/outline/outline/archive/2cd5d0e6245e27cf2e8b323b9576caff74e90b5b.zip +SOURCE_SUM=eeb38150037b8601c082774d42f726e8106817ec88f6ad3346ad4c88799712f1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/scripts/_common.sh b/scripts/_common.sh index f507ae3..11978d9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql" -NODEJS_VERSION=16 +NODEJS_VERSION=18 #================================================= # PERSONAL HELPERS diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 9dab630..6a05531 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -113,7 +113,7 @@ index 352d1993a..5e3c24636 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index 787991dc1..24ea2c8af 100644 +index 787991dc1..a7ec19544 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ @@ -121,7 +121,7 @@ index 787991dc1..24ea2c8af 100644 "build:i18n": "i18next --silent '{shared,app,server,plugins}/**/*.{ts,tsx}' && yarn copy:i18n", "build:server": "./build.sh", - "build": "yarn clean && yarn vite:build && yarn build:i18n && yarn build:server", -+ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1024' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1024' yarn build:server", ++ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=3072' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=3072' yarn build:server", "start": "node ./build/server/index.js", "dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"", "dev:backend": "nodemon --exec \"yarn build:server && yarn dev\" -e js,ts,tsx --ignore build/ --ignore app/ --ignore shared/editor", From 3dc6adc06502e3eb77c098ef0768b77cc73b629e Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 12:47:28 +0700 Subject: [PATCH 16/44] Update install script --- scripts/install | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index dbb8ce4..46ef509 100755 --- a/scripts/install +++ b/scripts/install @@ -217,17 +217,12 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - export NODE_OPTIONS=--max_old_space_size=1536 - ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=3 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 - ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 + ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 popd #================================================= From fd155de2cb48d084a67a8e647c9cdcf76743d44d Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 12:54:01 +0700 Subject: [PATCH 17/44] Update upgrade --- scripts/upgrade | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a160dea..568eb7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -135,16 +135,13 @@ ynh_script_progression --message="Building Yarn dependencies... This can be very pushd "$final_path" ynh_use_nodejs - ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 - ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 - ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=5 + export NODE_OPTIONS=--max_old_space_size=1024 + ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 + ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 + ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 popd #================================================= From 470604976ef65134759ad9bf418fdbe2c0dcd853 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 13:07:45 +0700 Subject: [PATCH 18/44] update install --- scripts/install | 3 ++- scripts/upgrade | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 46ef509..19bc76a 100755 --- a/scripts/install +++ b/scripts/install @@ -217,8 +217,9 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs + export NODE_OPTIONS=--max_old_space_size=1024 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 diff --git a/scripts/upgrade b/scripts/upgrade index 568eb7d..7f2b338 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,7 @@ pushd "$final_path" ynh_use_nodejs export NODE_OPTIONS=--max_old_space_size=1024 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 From 48495904a79c653037cfae2e75a57223e0287f18 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 13:30:10 +0700 Subject: [PATCH 19/44] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 6a05531..4d9a8ce 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -113,7 +113,7 @@ index 352d1993a..5e3c24636 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index 787991dc1..a7ec19544 100644 +index 787991dc1..b5b717014 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ @@ -121,7 +121,7 @@ index 787991dc1..a7ec19544 100644 "build:i18n": "i18next --silent '{shared,app,server,plugins}/**/*.{ts,tsx}' && yarn copy:i18n", "build:server": "./build.sh", - "build": "yarn clean && yarn vite:build && yarn build:i18n && yarn build:server", -+ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=3072' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=3072' yarn build:server", ++ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1900' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1900' yarn build:server", "start": "node ./build/server/index.js", "dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"", "dev:backend": "nodemon --exec \"yarn build:server && yarn dev\" -e js,ts,tsx --ignore build/ --ignore app/ --ignore shared/editor", From 6ebb61d73e69dd4e131b1d0af35837e71860ee13 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Feb 2023 15:24:25 +0700 Subject: [PATCH 20/44] Back to normal with swap --- scripts/install | 1 - scripts/upgrade | 1 - sources/patches/app-03-visitor.patch | 11 +---------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 19bc76a..45cd05d 100755 --- a/scripts/install +++ b/scripts/install @@ -217,7 +217,6 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - export NODE_OPTIONS=--max_old_space_size=1024 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 diff --git a/scripts/upgrade b/scripts/upgrade index 7f2b338..900e369 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -135,7 +135,6 @@ ynh_script_progression --message="Building Yarn dependencies... This can be very pushd "$final_path" ynh_use_nodejs - export NODE_OPTIONS=--max_old_space_size=1024 ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 4d9a8ce..926291b 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -113,18 +113,9 @@ index 352d1993a..5e3c24636 100644 version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/package.json b/package.json -index 787991dc1..b5b717014 100644 +index 787991dc1..7d610c010 100644 --- a/package.json +++ b/package.json -@@ -8,7 +8,7 @@ - "copy:i18n": "mkdir -p ./build/shared/i18n && cp -R ./shared/i18n/locales ./build/shared/i18n", - "build:i18n": "i18next --silent '{shared,app,server,plugins}/**/*.{ts,tsx}' && yarn copy:i18n", - "build:server": "./build.sh", -- "build": "yarn clean && yarn vite:build && yarn build:i18n && yarn build:server", -+ "build": "yarn clean && NODE_OPTIONS='--max-old-space-size=1900' yarn vite:build && yarn build:i18n && NODE_OPTIONS='--max-old-space-size=1900' yarn build:server", - "start": "node ./build/server/index.js", - "dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"", - "dev:backend": "nodemon --exec \"yarn build:server && yarn dev\" -e js,ts,tsx --ignore build/ --ignore app/ --ignore shared/editor", @@ -150,6 +150,7 @@ "passport": "^0.6.0", "passport-google-oauth2": "^0.2.0", From eae1e8fcd56c06824566eefe76d3ef09915a1e3b Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 18 Feb 2023 23:16:50 +0700 Subject: [PATCH 21/44] Update install --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 45cd05d..2c2ce2d 100755 --- a/scripts/install +++ b/scripts/install @@ -217,12 +217,14 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH node --max_old_space_size=2500 -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --max_old_space_size=2500 --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build --max_old_space_size=2500 2>&1 popd #================================================= From ef6a77307c3c1657190bdd7e82e57e2b36cf1b9f Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 19 Feb 2023 00:14:04 +0700 Subject: [PATCH 22/44] Update install --- scripts/install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 2c2ce2d..fa479b1 100755 --- a/scripts/install +++ b/scripts/install @@ -217,14 +217,12 @@ ynh_add_nginx_config pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH node --max_old_space_size=2500 -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --max_old_space_size=2500 --frozen-lockfile --network-timeout 1000000000 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build --max_old_space_size=2500 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=2500" yarn build 2>&1 popd #================================================= From 211efd1823e5528bb3feca92c18014f700c1157a Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 19 Feb 2023 15:15:07 +0700 Subject: [PATCH 23/44] Trying 1500 --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fa479b1..d58aa8d 100755 --- a/scripts/install +++ b/scripts/install @@ -222,7 +222,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=2500" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=2000" yarn build 2>&1 popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 900e369..ab949cf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,7 +140,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1500" yarn build 2>&1 popd #================================================= From 040a48c3f9a1afe73ad5565732c2a8d964af00b6 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 19 Feb 2023 15:36:00 +0700 Subject: [PATCH 24/44] Bump to fix Slack auth --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 8fa9cd8..d58677b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/2cd5d0e6245e27cf2e8b323b9576caff74e90b5b.zip -SOURCE_SUM=eeb38150037b8601c082774d42f726e8106817ec88f6ad3346ad4c88799712f1 +SOURCE_URL=https://github.com/outline/outline/archive/7c05b7326af47d904492a4662f79a9f010127be7.zip +SOURCE_SUM=2634de5432a76717b6ecc00bec79c9a9384dd20a36d03bab44d1290f5d75f63d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From 05a4a2829e3bca9b896d0b2c8e46d3c2ffb6b7cc Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 19 Feb 2023 15:44:49 +0700 Subject: [PATCH 25/44] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab949cf..f1ef92c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,7 +140,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1500" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1750" yarn build 2>&1 popd #================================================= From c975efb46c88a00b89e8e1d42a8b60b45e16e3dc Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 20 Feb 2023 23:00:28 +0700 Subject: [PATCH 26/44] Updates --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index d58aa8d..139ad44 100755 --- a/scripts/install +++ b/scripts/install @@ -222,7 +222,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=2000" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1900" yarn build 2>&1 popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f1ef92c..4164934 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,7 +140,7 @@ pushd "$final_path" ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1750" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=1900" yarn build 2>&1 popd #================================================= From 81201867fc7a79b128b0a1f7e6281e4b74ea0fb6 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 22 Feb 2023 13:03:09 +0700 Subject: [PATCH 27/44] Tentative comments --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index d58677b..e240cfc 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/7c05b7326af47d904492a4662f79a9f010127be7.zip -SOURCE_SUM=2634de5432a76717b6ecc00bec79c9a9384dd20a36d03bab44d1290f5d75f63d +SOURCE_URL=https://github.com/outline/outline/archive/cb90f07c3924d14d644006e77559e3c716a8a698.zip +SOURCE_SUM=538cbda198a36267760443f2ba7ee2de4cce9f9410be96719c0317a1ed12a7f0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From 161f5aba786a13f8397a0259495dc2903e41a5b2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 22 Feb 2023 14:03:56 +0700 Subject: [PATCH 28/44] Delete app-04-bible.patch --- sources/patches/app-04-bible.patch | 135 ----------------------------- 1 file changed, 135 deletions(-) delete mode 100644 sources/patches/app-04-bible.patch diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch deleted file mode 100644 index 1018614..0000000 --- a/sources/patches/app-04-bible.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx -index 42269b5e4..174c84c02 100644 ---- a/app/editor/menus/block.tsx -+++ b/app/editor/menus/block.tsx -@@ -19,6 +19,7 @@ import { - ClockIcon, - CalendarIcon, - MathIcon, -+ BookmarkedIcon, - } from "outline-icons"; - import * as React from "react"; - import styled from "styled-components"; -@@ -187,6 +188,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { - keywords: "notice card suggestion", - attrs: { style: "tip" }, - }, -+ { -+ name: "container_notice", -+ title: dictionary.bibleNotice, -+ icon: , -+ keywords: "notice card bible", -+ attrs: { style: "bible" }, -+ }, - { - name: "separator", - }, -diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts -index 5b9196de5..90caf27d7 100644 ---- a/app/hooks/useDictionary.ts -+++ b/app/hooks/useDictionary.ts -@@ -75,6 +75,8 @@ export default function useDictionary() { - showSource: t("Show source"), - warning: t("Warning"), - warningNotice: t("Warning notice"), -+ bible: t("Bible"), -+ bibleNotice: t("Bible quote"), - insertDate: t("Current date"), - insertTime: t("Current time"), - insertDateTime: t("Current date and time"), -diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts -index 5a4d4a079..e43c4fc29 100644 ---- a/app/typings/styled-components.d.ts -+++ b/app/typings/styled-components.d.ts -@@ -53,6 +53,8 @@ declare module "styled-components" { - noticeTipText: string; - noticeWarningBackground: string; - noticeWarningText: string; -+ noticeBibleBackground: string; -+ noticeBibleText: string; - } - - interface Colors { -diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts -index c61b0fdb4..6ea2a6798 100644 ---- a/shared/editor/components/Styles.ts -+++ b/shared/editor/components/Styles.ts -@@ -635,6 +635,20 @@ h6 { - } - } - -+.notice-block.bible { -+ background: ${transparentize(0.9, props.theme.noticeBibleBackground)}; -+ border-left: 4px solid ${props.theme.noticeBibleBackground}; -+ color: ${props.theme.noticeBibleText}; -+ -+ .icon { -+ color: ${props.theme.noticeBibleBackground}; -+ } -+ -+ a { -+ color: ${props.theme.noticeBibleText}; -+ } -+} -+ - blockquote { - margin: 0; - padding-left: 1.5em; -diff --git a/shared/editor/nodes/Notice.tsx b/shared/editor/nodes/Notice.tsx -index 158a0dfb9..f297c3433 100644 ---- a/shared/editor/nodes/Notice.tsx -+++ b/shared/editor/nodes/Notice.tsx -@@ -1,5 +1,5 @@ - import Token from "markdown-it/lib/token"; --import { WarningIcon, InfoIcon, StarredIcon } from "outline-icons"; -+import { WarningIcon, InfoIcon, StarredIcon, BookmarkedIcon } from "outline-icons"; - import { wrappingInputRule } from "prosemirror-inputrules"; - import { NodeSpec, Node as ProsemirrorNode, NodeType } from "prosemirror-model"; - import * as React from "react"; -@@ -15,6 +15,7 @@ export default class Notice extends Node { - info: this.options.dictionary.info, - warning: this.options.dictionary.warning, - tip: this.options.dictionary.tip, -+ bible: this.options.dictionary.bible, - }); - } - -@@ -47,6 +48,8 @@ export default class Notice extends Node { - ? "tip" - : dom.className.includes("warning") - ? "warning" -+ : dom.className.includes("bible") -+ ? "bible" - : undefined, - }), - }, -@@ -75,6 +78,8 @@ export default class Notice extends Node { - component = ; - } else if (node.attrs.style === "warning") { - component = ; -+ } else if (node.attrs.style === "bible") { -+ component = ; - } else { - component = ; - } -diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts -index f28d552c0..1e6490890 100644 ---- a/shared/styles/theme.ts -+++ b/shared/styles/theme.ts -@@ -88,6 +88,8 @@ export const base = { - noticeTipText: colors.almostBlack, - noticeWarningBackground: "#d73a49", - noticeWarningText: colors.almostBlack, -+ noticeBibleBackground: "#996633", -+ noticeBibleText: colors.almostBlack, - breakpoints, - }; - -@@ -213,6 +215,7 @@ export const dark = { - noticeInfoText: colors.white, - noticeTipText: colors.white, - noticeWarningText: colors.white, -+ noticeBibleText: colors.white, - progressBarBackground: colors.slate, - scrollbarBackground: colors.black, - scrollbarThumb: colors.lightBlack, \ No newline at end of file From fa40c9b5457e3a59afd0c2fa1cd33245027b0489 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 26 Feb 2023 16:03:51 +0700 Subject: [PATCH 29/44] First pass --- conf/app.src | 4 +- manifest.json | 2 +- sources/patches/app-01-branding.patch | 32 ++++++ sources/patches/app-03-visitor.patch | 69 ++++++++---- sources/patches/app-05-login.patch | 4 +- sources/patches/app-06-bible.patch | 151 ++++++++++++++++++++++++++ 6 files changed, 236 insertions(+), 26 deletions(-) create mode 100644 sources/patches/app-01-branding.patch create mode 100644 sources/patches/app-06-bible.patch diff --git a/conf/app.src b/conf/app.src index e240cfc..c200802 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/cb90f07c3924d14d644006e77559e3c716a8a698.zip -SOURCE_SUM=538cbda198a36267760443f2ba7ee2de4cce9f9410be96719c0317a1ed12a7f0 +SOURCE_URL=https://github.com/outline/outline/archive/b813f20f8f3f7dafe872dea28f80776f6f43d5ed.zip +SOURCE_SUM=80314d88d0cca232d2db9aad1377a8d143704757f9a8d475cd826f10704eb4b2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 7996e1b..c01dbbb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Wiki and knowledge base for teams", "fr": "Wiki et base de connaissances pour les équipes" }, - "version": "0.68.0~ynh1", + "version": "0.68.0~ynh2", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", diff --git a/sources/patches/app-01-branding.patch b/sources/patches/app-01-branding.patch new file mode 100644 index 0000000..1ccfea7 --- /dev/null +++ b/sources/patches/app-01-branding.patch @@ -0,0 +1,32 @@ +diff --git a/app/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx +index 3d55a359e..50510b816 100644 +--- a/app/scenes/Document/components/Document.tsx ++++ b/app/scenes/Document/components/Document.tsx +@@ -632,11 +632,6 @@ class DocumentScene extends React.Component { + + + +- {isShare && +- !parseDomain(window.location.origin).custom && +- !auth.user && ( +- +- )} + + {!isShare && ( +