From 635f98adda28e2269b074ff2306419e2b1ce451d Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 30 Sep 2023 10:36:20 +0700 Subject: [PATCH 1/7] Update --- 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 30fc472..bb02976 100755 --- a/scripts/install +++ b/scripts/install @@ -189,7 +189,7 @@ pushd "$final_path" 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="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=3900" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=3200" yarn build 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 popd diff --git a/scripts/restore b/scripts/restore index eae6a2f..17db50b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -104,7 +104,7 @@ ynh_script_progression --message="Restoring the app local storage..." --weight=1 ynh_restore_file --origin_path="/var/lib/outline" -chmod 400 "/var/lib/outline" +chmod 750 "/var/lib/outline" chown -R $app:www-data "/var/lib/outline" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index da9ddcb..7ca1231 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,7 +150,7 @@ pushd "$final_path" 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="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=1900" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=3200" yarn build 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 popd From 729f9eb50732e5f417d304c295b41194afa6b72c Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 30 Sep 2023 22:43:42 +0700 Subject: [PATCH 2/7] Test --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 17db50b..aa6a701 100755 --- a/scripts/restore +++ b/scripts/restore @@ -104,7 +104,7 @@ ynh_script_progression --message="Restoring the app local storage..." --weight=1 ynh_restore_file --origin_path="/var/lib/outline" -chmod 750 "/var/lib/outline" +chmod -R 750 "/var/lib/outline" chown -R $app:www-data "/var/lib/outline" #================================================= From fbb9a4993e2d54ac34bd6e65b70aecd47983cba4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 1 Oct 2023 15:21:32 +0700 Subject: [PATCH 3/7] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e91c6ff..dfb2dc6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,7 +150,7 @@ pushd "$final_path" 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="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=1900" yarn build 2>&1 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=3900" yarn build 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 popd From 119948212b26b7de1958b03cea5b492b5cbda616 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 7 Oct 2023 15:16:03 +0700 Subject: [PATCH 4/7] Update patches --- sources/patches/app-02-visitor.patch | 4 ++-- sources/patches/app-04-bible.patch | 4 ++-- sources/patches/diff.txt | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/patches/app-02-visitor.patch b/sources/patches/app-02-visitor.patch index c687d17..6b88247 100644 --- a/sources/patches/app-02-visitor.patch +++ b/sources/patches/app-02-visitor.patch @@ -1,5 +1,5 @@ diff --git a/package.json b/package.json -index 92b6ec86b..9215ec275 100644 +index fa43b3532..32a658cee 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ @@ -106,7 +106,7 @@ index 000000000..bc03fc6d3 + +export default router; diff --git a/yarn.lock b/yarn.lock -index d9e8ec607..a1106ef17 100644 +index 0413a0132..a35fe073c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10340,6 +10340,14 @@ passport-oauth@1.0.x: diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index e4c86c7..e78078d 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -67,10 +67,10 @@ index f30b74449..406e1fcde 100644 interface Colors { diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts -index 056826ddc..9a1c7bd69 100644 +index 906d070d0..e246e36fb 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts -@@ -854,6 +854,20 @@ h6 { +@@ -865,6 +865,20 @@ h6 { } } diff --git a/sources/patches/diff.txt b/sources/patches/diff.txt index 9552c54..f93cc90 100644 --- a/sources/patches/diff.txt +++ b/sources/patches/diff.txt @@ -142,7 +142,7 @@ index f30b74449..406e1fcde 100644 interface Colors { diff --git a/package.json b/package.json -index 92b6ec86b..9215ec275 100644 +index fa43b3532..32a658cee 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ @@ -262,10 +262,10 @@ index 4d4f6f09c..f457025d5 100644 } diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts -index 056826ddc..9a1c7bd69 100644 +index 906d070d0..e246e36fb 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts -@@ -854,6 +854,20 @@ h6 { +@@ -865,6 +865,20 @@ h6 { } } @@ -345,7 +345,7 @@ index f76e9c6a2..05d78850a 100644 scrollbarBackground: colors.black, scrollbarThumb: colors.lightBlack, diff --git a/yarn.lock b/yarn.lock -index d9e8ec607..a1106ef17 100644 +index 0413a0132..a35fe073c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10340,6 +10340,14 @@ passport-oauth@1.0.x: From 4d6c61d0889d9ba2ecf4330e68c80742f4575b4a Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 7 Oct 2023 15:19:31 +0700 Subject: [PATCH 5/7] Other updates --- conf/app.src | 4 ++-- doc/DISCLAIMER.md | 4 ++-- manifest.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index 4c3b553..578945a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/5397907599d373bcb5cef8057d4c58526d64b084.zip -SOURCE_SUM=751bfaf5b1abb346337c537795540a4a809e544891d1313ed1df66b31261df5e +SOURCE_URL=https://github.com/outline/outline/archive/ebeb201a9f48e2c6b619a0d152e051946849aa10.zip +SOURCE_SUM=7f7afaff1c12a197583871659f7d08355586a4727133e903a63fd5def1bfbcd2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 215de69..b9e3462 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,13 +1,13 @@ ### 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.72.0) 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.72.1) will be released under Apache-2.0 licence [after August 18th 2027](https://github.com/outline/outline/blob/ebeb201a9f48e2c6b619a0d152e051946849aa10/LICENSE). ### Known limitations 1. The app can now run in the CI server and reach level 8. However, it is still very young and not broadly tested. **Please use it with extreme care if it's on a prod server** 2. The app requires [Dex app](https://github.com/YunoHost-apps/dex_ynh) to be installed (Dex installation and setup is automatic, though) -3. The app is requiring three domains including two fully dedicated (one for MinIO server, one for Dex, one for Outline) +3. The app is requiring two domains including one fully dedicated (one for Dex, one for Outline) 4. ARM architectures are not yet supported (But it should be achievable soon) 5. Because it's built from sources, the app requires an important amount of RAM, disk and time to install properly diff --git a/manifest.json b/manifest.json index 927aa34..4d3d3c0 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.72.0.3.2~ynh1", + "version": "0.72.1~ynh1", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", From f7a36b2d1e4c1d01f5010abbf3285aad5be73121 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 7 Oct 2023 15:22:25 +0700 Subject: [PATCH 6/7] Update for public version --- sources/patches/app-02-visitor.patch | 141 ---------- sources/patches/app-03-login.patch | 59 ----- sources/patches/app-04-bible.patch | 151 ----------- sources/patches/diff.txt | 380 --------------------------- 4 files changed, 731 deletions(-) delete mode 100644 sources/patches/app-02-visitor.patch delete mode 100644 sources/patches/app-03-login.patch delete mode 100644 sources/patches/app-04-bible.patch delete mode 100644 sources/patches/diff.txt diff --git a/sources/patches/app-02-visitor.patch b/sources/patches/app-02-visitor.patch deleted file mode 100644 index 6b88247..0000000 --- a/sources/patches/app-02-visitor.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff --git a/package.json b/package.json -index fa43b3532..32a658cee 100644 ---- a/package.json -+++ b/package.json -@@ -157,6 +157,7 @@ - "patch-package": "^7.0.2", - "pg": "^8.11.1", - "pg-tsquery": "^8.4.1", -+ "passport-req": "^0.1.1", - "polished": "^4.2.2", - "prosemirror-codemark": "^0.4.2", - "prosemirror-commands": "^1.5.2", -diff --git a/plugins/req/plugin.json b/plugins/req/plugin.json -new file mode 100644 -index 000000000..ae7c40333 ---- /dev/null -+++ b/plugins/req/plugin.json -@@ -0,0 +1,4 @@ -+{ -+ "name": "visiteur", -+ "description": "Adds an req compatible authentication provider." -+} -diff --git a/plugins/req/server/.babelrc b/plugins/req/server/.babelrc -new file mode 100644 -index 000000000..c87001bc4 ---- /dev/null -+++ b/plugins/req/server/.babelrc -@@ -0,0 +1,3 @@ -+{ -+ "extends": "../../../server/.babelrc" -+} -diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts -new file mode 100644 -index 000000000..bc03fc6d3 ---- /dev/null -+++ b/plugins/req/server/auth/req.ts -@@ -0,0 +1,70 @@ -+import passport from "@outlinewiki/koa-passport"; -+import type { Context } from "koa"; -+import Router from "koa-router"; -+import { capitalize } from "lodash"; -+import { Strategy as ReqStrategy } from "passport-req"; -+import { slugifyDomain } from "@shared/utils/domains"; -+import accountProvisioner from "@server/commands/accountProvisioner"; -+import env from "@server/env"; -+import passportMiddleware from "@server/middlewares/passport"; -+import { User } from "@server/models"; -+import { AuthenticationResult } from "@server/types"; -+import { -+ StateStore, -+ getTeamFromContext, -+ getClientFromContext, -+} from "@server/utils/passport"; -+ -+const router = new Router(); -+const providerName = "req"; -+ -+export const config = { -+ name: "visiteur", -+ enabled: true, -+}; -+ -+if (true) { -+ passport.use( -+ new ReqStrategy( -+ async function (req,done) { -+ try { -+ const domain = "domain.tld"; -+ const subdomain = domain.split(".")[0]; -+ const teamName = capitalize(subdomain); -+ const name = "visiteur"; -+ const email = "visiteur@anthropologiebiblique.fr"; -+ const result = await accountProvisioner({ -+ ip: req.ip, -+ team: { -+ name: teamName, -+ domain, -+ subdomain, -+ }, -+ user: { -+ name: name, -+ email: email, -+ avatarUrl: null, -+ }, -+ authenticationProvider: { -+ name: providerName, -+ providerId: domain, -+ }, -+ authentication: { -+ providerId: "1234", -+ accessToken: null, -+ refreshToken: null, -+ scopes: [], -+ }, -+ }); -+ return done(null, result.user, result); -+ } catch (err) { -+ return done(err, null); -+ } -+ } -+ ) -+ ); -+ -+ router.get("req", passportMiddleware(providerName)); -+} -+ -+export default router; -diff --git a/yarn.lock b/yarn.lock -index 0413a0132..a35fe073c 100644 ---- a/yarn.lock -+++ b/yarn.lock -@@ -10340,6 +10340,14 @@ passport-oauth@1.0.x: - passport-oauth1 "1.x.x" - passport-oauth2 "1.x.x" - -+passport-req@^0.1.1: -+ version "0.1.1" -+ resolved "https://registry.yarnpkg.com/passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" -+ integrity sha512-9qmM0vD5v7jYLWxezNNCleOw+8IkVAuvOwQ6NJaUuJkdFJTR1KatXH1i5MxWgffx+libLWYLRUPtc6GHOmn+6w== -+ dependencies: -+ passport "~0.1.1" -+ pkginfo "0.2.x" -+ - passport-slack-oauth2@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.2.0.tgz#d214a698b55a137393636a26827747f6c436dab4" -@@ -10361,6 +10369,14 @@ passport@^0.6.0: - pause "0.0.1" - utils-merge "^1.0.1" - -+passport@~0.1.1: -+ version "0.1.18" -+ resolved "https://registry.yarnpkg.com/passport/-/passport-0.1.18.tgz#c8264479dcb6414cadbb66752d12b37e0b6525a1" -+ integrity sha512-qteYojKG/qth7UBbbGU7aqhe5ndJs6YaUkH2B6+7FWQ0OeyYmWknzOATpMhdoSTDcLLliq9n4Fcy1mGs80iUMw== -+ dependencies: -+ pause "0.0.1" -+ pkginfo "0.2.x" -+ - passthrough-counter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/passthrough-counter/-/passthrough-counter-1.0.0.tgz#1967d9e66da572b5c023c787db112a387ab166fa" diff --git a/sources/patches/app-03-login.patch b/sources/patches/app-03-login.patch deleted file mode 100644 index 4ed113a..0000000 --- a/sources/patches/app-03-login.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/app/scenes/Login/components/AuthenticationProvider.tsx b/app/scenes/Login/components/AuthenticationProvider.tsx -index af218c06c..b2d93d994 100644 ---- a/app/scenes/Login/components/AuthenticationProvider.tsx -+++ b/app/scenes/Login/components/AuthenticationProvider.tsx -@@ -91,7 +91,7 @@ function AuthenticationProvider(props: Props) { - - -- {t("Sign In")} → -+ {t("S'identifier")} → - - - ) : ( - } fullwidth> -- {t("Continue with Email")} -+ {t("Accès membre (email)")} - - )} - -@@ -120,7 +120,7 @@ function AuthenticationProvider(props: Props) { - icon={} - fullwidth - > -- {t("Continue with {{ authProviderName }}", { -+ {t("Accès {{ authProviderName }}", { - authProviderName: name, - })} - -diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index de4245890..c751e3299 100644 ---- a/app/scenes/Login/index.tsx -+++ b/app/scenes/Login/index.tsx -@@ -255,7 +255,7 @@ function Login({ children }: Props) { - ) : ( - <> - -- {t("Login to {{ authProviderName }}", { -+ {t("Bienvenue sur Anthropologie Biblique", { - authProviderName: config.name || env.APP_NAME, - })} - -@@ -273,7 +273,7 @@ function Login({ children }: Props) { - {hasMultipleProviders && ( - <> - -- {t("You signed in with {{ authProviderName }} last time.", { -+ {t("Vous vous êtes authentifié avec l'accès {{ authProviderName }} la dernière fois.", { - authProviderName: defaultProvider.name, - })} - diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch deleted file mode 100644 index e78078d..0000000 --- a/sources/patches/app-04-bible.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx -index f795fc56d..a4dc4e17a 100644 ---- a/app/editor/menus/block.tsx -+++ b/app/editor/menus/block.tsx -@@ -21,6 +21,7 @@ import { - MathIcon, - DoneIcon, - EmbedIcon, -+ BookmarkedIcon, - } from "outline-icons"; - import * as React from "react"; - import styled from "styled-components"; -@@ -203,6 +204,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 6472c88cc..8bedb092d 100644 ---- a/app/hooks/useDictionary.ts -+++ b/app/hooks/useDictionary.ts -@@ -78,6 +78,8 @@ export default function useDictionary() { - warningNotice: t("Warning notice"), - success: t("Success"), - successNotice: t("Success 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/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx -index 8e3542d40..8a7c461af 100644 ---- a/app/scenes/Document/components/Document.tsx -+++ b/app/scenes/Document/components/Document.tsx -@@ -552,11 +552,6 @@ class DocumentScene extends React.Component { - - - -- {isShare && -- !parseDomain(window.location.origin).custom && -- !auth.user && ( -- -- )} - - {!isShare && ( -