From 6abca6a6a034e52b49587800f895b4eeb672f20e Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Thu, 8 Aug 2024 07:54:21 +0000 Subject: [PATCH 01/81] add SimpleBar to PageSelectModal --- .../PageSelectModal.module.scss | 3 ++ .../PageSelectModal/PageSelectModal.tsx | 46 +++++++++++++++---- 2 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss b/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss new file mode 100644 index 00000000000..9b0507b0582 --- /dev/null +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss @@ -0,0 +1,3 @@ +.grw-page-select-modal-wrapper { + height: 50vh; +} diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index f59c5a76ce6..117bc95909f 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -1,6 +1,7 @@ import type { FC } from 'react'; import { Suspense, useState, useCallback, + memo, } from 'react'; import nodePath from 'path'; @@ -19,9 +20,30 @@ import { useSWRxCurrentPage } from '~/stores/page'; import { ItemsTree } from '../ItemsTree'; import ItemsTreeContentSkeleton from '../ItemsTree/ItemsTreeContentSkeleton'; import { usePagePathRenameHandler } from '../PageEditor/page-path-rename-utils'; +import { StickyStretchableScroller } from '../StickyStretchableScroller'; import { TreeItemForModal } from './TreeItemForModal'; +import 'simplebar'; +import 'simplebar/dist/simplebar.css'; + +const TreeForModalWrapper = memo((props: { children: JSX.Element }) => { + + const { children } = props; + + const calcViewHeight = useCallback(() => { + return window.innerHeight / 2; + }, []); + + return ( +
+
+ { children } +
+
+ ); +}); + export const PageSelectModal: FC = () => { const { data: PageSelectModalData, @@ -85,17 +107,21 @@ export const PageSelectModal: FC = () => { size="sm" > {t('page_select_modal.select_page_location')} - + }> - + +
+ +
+
From b88291a47934a664305a8c9d8c9a23f6e202d306 Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Fri, 9 Aug 2024 05:18:24 +0000 Subject: [PATCH 02/81] StickyStretchableScroller delete --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 117bc95909f..a0cd4bdefa4 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -20,7 +20,6 @@ import { useSWRxCurrentPage } from '~/stores/page'; import { ItemsTree } from '../ItemsTree'; import ItemsTreeContentSkeleton from '../ItemsTree/ItemsTreeContentSkeleton'; import { usePagePathRenameHandler } from '../PageEditor/page-path-rename-utils'; -import { StickyStretchableScroller } from '../StickyStretchableScroller'; import { TreeItemForModal } from './TreeItemForModal'; From 40c528af495466c3c2ed85804c790db732da3cad Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Fri, 9 Aug 2024 05:20:54 +0000 Subject: [PATCH 03/81] calcViewHeight delete --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index a0cd4bdefa4..8bcfe6f5cf0 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -30,9 +30,6 @@ const TreeForModalWrapper = memo((props: { children: JSX.Element }) => { const { children } = props; - const calcViewHeight = useCallback(() => { - return window.innerHeight / 2; - }, []); return (
From cc50ee76be7fa604db276a8dc4ee6936f86a9e1b Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Fri, 9 Aug 2024 08:22:10 +0000 Subject: [PATCH 04/81] SimpleBar add --- .../components/PageSelectModal/PageSelectModal.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 8bcfe6f5cf0..6342f21ee8b 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -11,6 +11,7 @@ import { useTranslation } from 'next-i18next'; import { Modal, ModalHeader, ModalBody, ModalFooter, Button, } from 'reactstrap'; +import SimpleBar from 'simplebar-react'; import type { IPageForItem } from '~/interfaces/page'; import { useTargetAndAncestors, useIsGuestUser, useIsReadOnlyUser } from '~/stores-universal/context'; @@ -23,19 +24,16 @@ import { usePagePathRenameHandler } from '../PageEditor/page-path-rename-utils'; import { TreeItemForModal } from './TreeItemForModal'; -import 'simplebar'; -import 'simplebar/dist/simplebar.css'; +import 'simplebar-react/dist/simplebar.min.css'; const TreeForModalWrapper = memo((props: { children: JSX.Element }) => { const { children } = props; - - return (
-
+ { children } -
+
); }); From bb5fffe1f188aa925aebadd3bac4ffbf4b9c46e0 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Mon, 26 Aug 2024 06:18:05 +0000 Subject: [PATCH 05/81] upgrade codemirror --- yarn.lock | 389 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 235 insertions(+), 154 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8a2641920ce..d85576dae4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1183,13 +1183,20 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.1", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.15", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.1", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.15", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.18.6": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.4.tgz#6ef37d678428306e7d75f054d5b1bdb8cf8aa8ee" + integrity sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.24.6", "@babel/template@^7.3.3": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.6.tgz#048c347b2787a6072b24c723664c8d02b67a44f9" @@ -1477,34 +1484,34 @@ prettier "^2.7.1" "@codemirror/autocomplete@^6.0.0", "@codemirror/autocomplete@^6.3.2", "@codemirror/autocomplete@^6.7.1": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.9.0.tgz#1a1e63122288b8f8e1e9d7aff2eb39a83e04d8a9" - integrity sha512-Fbwm0V/Wn3BkEJZRhr0hi5BhCo5a7eBL6LYaliPjOSwCyfOpnjXY59HruSxOUNV+1OYer0Tgx1zRNQttjXyDog== + version "6.18.0" + resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.18.0.tgz#5f39b05daca04c95e990b70024144df47b2aa635" + integrity sha512-5DbOvBbY4qW5l57cjDsmmpDh3/TeK1vXfTHa+BUMrRzdWdcxKZ4U4V7vQaTtOpApNU4kLS4FQ6cINtLg245LXA== dependencies: "@codemirror/language" "^6.0.0" "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.6.0" + "@codemirror/view" "^6.17.0" "@lezer/common" "^1.0.0" "@codemirror/commands@^6.0.0", "@codemirror/commands@^6.1.0": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.2.4.tgz#b8a0e5ce72448c092ba4c4b1d902e6f183948aec" - integrity sha512-42lmDqVH0ttfilLShReLXsDfASKLXzfyC36bzwcqzox9PlHulMcsUOfHXNo2X2aFMVNUoQ7j+d4q5bnfseYoOA== + version "6.6.0" + resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.6.0.tgz#d308f143fe1b8896ca25fdb855f66acdaf019dd4" + integrity sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg== dependencies: "@codemirror/language" "^6.0.0" - "@codemirror/state" "^6.2.0" - "@codemirror/view" "^6.0.0" - "@lezer/common" "^1.0.0" + "@codemirror/state" "^6.4.0" + "@codemirror/view" "^6.27.0" + "@lezer/common" "^1.1.0" "@codemirror/lang-angular@^0.1.0": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@codemirror/lang-angular/-/lang-angular-0.1.2.tgz#a3f565297842ad60caf2a0bf6f6137c13d19a666" - integrity sha512-Nq7lmx9SU+JyoaRcs6SaJs7uAmW2W06HpgJVQYeZptVGNWDzDvzhjwVb/ZuG1rwTlOocY4Y9GwNOBuKCeJbKtw== + version "0.1.3" + resolved "https://registry.yarnpkg.com/@codemirror/lang-angular/-/lang-angular-0.1.3.tgz#83035e7e9e1f0e2ba466e83d778407b519089a28" + integrity sha512-xgeWGJQQl1LyStvndWtruUvb4SnBZDAu/gvFH/ZU+c0W25tQR8e5hq7WTwiIY2dNxnf+49mRiGI/9yxIwB6f5w== dependencies: "@codemirror/lang-html" "^6.0.0" "@codemirror/lang-javascript" "^6.1.2" "@codemirror/language" "^6.0.0" - "@lezer/common" "^1.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.3.3" @@ -1517,9 +1524,9 @@ "@lezer/cpp" "^1.0.0" "@codemirror/lang-css@^6.0.0", "@codemirror/lang-css@^6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@codemirror/lang-css/-/lang-css-6.2.0.tgz#f84f9da392099432445c75e32fdac63ae572315f" - integrity sha512-oyIdJM29AyRPM3+PPq1I2oIk8NpUfEN3kAM05XWDDs6o3gSneIKaVJifT2P+fqONLou2uIgXynFyMUDQvo/szA== + version "6.2.1" + resolved "https://registry.yarnpkg.com/@codemirror/lang-css/-/lang-css-6.2.1.tgz#5dc0a43b8e3c31f6af7aabd55ff07fe9aef2a227" + integrity sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/language" "^6.0.0" @@ -1527,17 +1534,28 @@ "@lezer/common" "^1.0.2" "@lezer/css" "^1.0.0" +"@codemirror/lang-go@^6.0.0": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@codemirror/lang-go/-/lang-go-6.0.1.tgz#598222c90f56eae28d11069c612ca64d0306b057" + integrity sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg== + dependencies: + "@codemirror/autocomplete" "^6.0.0" + "@codemirror/language" "^6.6.0" + "@codemirror/state" "^6.0.0" + "@lezer/common" "^1.0.0" + "@lezer/go" "^1.0.0" + "@codemirror/lang-html@^6.0.0": - version "6.4.5" - resolved "https://registry.yarnpkg.com/@codemirror/lang-html/-/lang-html-6.4.5.tgz#4cf014da02624a8a4365ef6c8e343f35afa0c784" - integrity sha512-dUCSxkIw2G+chaUfw3Gfu5kkN83vJQN8gfQDp9iEHsIZluMJA0YJveT12zg/28BJx+uPsbQ6VimKCgx3oJrZxA== + version "6.4.9" + resolved "https://registry.yarnpkg.com/@codemirror/lang-html/-/lang-html-6.4.9.tgz#d586f2cc9c341391ae07d1d7c545990dfa069727" + integrity sha512-aQv37pIMSlueybId/2PVSP6NPnmurFDVmZwzc7jszd2KAF8qd4VBbvNYPXWQq90WIARjsdVkPbw29pszmHws3Q== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/lang-css" "^6.0.0" "@codemirror/lang-javascript" "^6.0.0" "@codemirror/language" "^6.4.0" "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.2.2" + "@codemirror/view" "^6.17.0" "@lezer/common" "^1.0.0" "@lezer/css" "^1.1.0" "@lezer/html" "^1.3.0" @@ -1551,15 +1569,15 @@ "@lezer/java" "^1.0.0" "@codemirror/lang-javascript@^6.0.0", "@codemirror/lang-javascript@^6.1.2": - version "6.1.9" - resolved "https://registry.yarnpkg.com/@codemirror/lang-javascript/-/lang-javascript-6.1.9.tgz#19065ad32db7b3797829eca01b8d9c69da5fd0d6" - integrity sha512-z3jdkcqOEBT2txn2a87A0jSy6Te3679wg/U8QzMeftFt+4KA6QooMwfdFzJiuC3L6fXKfTXZcDocoaxMYfGz0w== + version "6.2.2" + resolved "https://registry.yarnpkg.com/@codemirror/lang-javascript/-/lang-javascript-6.2.2.tgz#7141090b22994bef85bcc5608a3bc1257f2db2ad" + integrity sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/language" "^6.6.0" "@codemirror/lint" "^6.0.0" "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.0.0" + "@codemirror/view" "^6.17.0" "@lezer/common" "^1.0.0" "@lezer/javascript" "^1.0.0" @@ -1572,26 +1590,41 @@ "@lezer/json" "^1.0.0" "@codemirror/lang-less@^6.0.0": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@codemirror/lang-less/-/lang-less-6.0.1.tgz#fef10e8dbcd07055b815c3928233a05a8549181e" - integrity sha512-ABcsKBjLbyPZwPR5gePpc8jEKCQrFF4pby2WlMVdmJOOr7OWwwyz8DZonPx/cKDE00hfoSLc8F7yAcn/d6+rTQ== + version "6.0.2" + resolved "https://registry.yarnpkg.com/@codemirror/lang-less/-/lang-less-6.0.2.tgz#2e3d82a3ddb8710e6409689cd4a28c66558d0cb8" + integrity sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ== dependencies: "@codemirror/lang-css" "^6.2.0" "@codemirror/language" "^6.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" +"@codemirror/lang-liquid@^6.0.0": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@codemirror/lang-liquid/-/lang-liquid-6.2.1.tgz#78ded5e5b2aabbdf4687787ba9a29fce0da7e2ad" + integrity sha512-J1Mratcm6JLNEiX+U2OlCDTysGuwbHD76XwuL5o5bo9soJtSbz2g6RU3vGHFyS5DC8rgVmFSzi7i6oBftm7tnA== + dependencies: + "@codemirror/autocomplete" "^6.0.0" + "@codemirror/lang-html" "^6.0.0" + "@codemirror/language" "^6.0.0" + "@codemirror/state" "^6.0.0" + "@codemirror/view" "^6.0.0" + "@lezer/common" "^1.0.0" + "@lezer/highlight" "^1.0.0" + "@lezer/lr" "^1.3.1" + "@codemirror/lang-markdown@^6.0.0", "@codemirror/lang-markdown@^6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.2.0.tgz#d391d1314911da522bf4cc4edb15ff6b3eb66979" - integrity sha512-deKegEQVzfBAcLPqsJEa+IxotqPVwWZi90UOEvQbfa01NTAw8jNinrykuYPTULGUj+gha0ZG2HBsn4s5d64Qrg== + version "6.2.5" + resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.2.5.tgz#451941bf743d3788e73598f1aedb71cbeb6f71ba" + integrity sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA== dependencies: "@codemirror/autocomplete" "^6.7.1" "@codemirror/lang-html" "^6.0.0" "@codemirror/language" "^6.3.0" "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" - "@lezer/common" "^1.0.0" + "@lezer/common" "^1.2.1" "@lezer/markdown" "^1.0.0" "@codemirror/lang-php@^6.0.0": @@ -1606,12 +1639,14 @@ "@lezer/php" "^1.0.0" "@codemirror/lang-python@^6.0.0": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@codemirror/lang-python/-/lang-python-6.1.3.tgz#47b8d9fb42eb4482317843e519c6c211accacb62" - integrity sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ== + version "6.1.6" + resolved "https://registry.yarnpkg.com/@codemirror/lang-python/-/lang-python-6.1.6.tgz#0c55e7e2dfa85b68be93b9692e5d3f76f284bbb2" + integrity sha512-ai+01WfZhWqM92UqjnvorkxosZ2aq2u28kHvr+N3gu012XqY2CThD67JPMHnGceRfXPDBmn1HnyqowdpF57bNg== dependencies: "@codemirror/autocomplete" "^6.3.2" "@codemirror/language" "^6.8.0" + "@codemirror/state" "^6.0.0" + "@lezer/common" "^1.2.1" "@lezer/python" "^1.1.4" "@codemirror/lang-rust@^6.0.0": @@ -1634,61 +1669,78 @@ "@lezer/sass" "^1.0.0" "@codemirror/lang-sql@^6.0.0": - version "6.5.2" - resolved "https://registry.yarnpkg.com/@codemirror/lang-sql/-/lang-sql-6.5.2.tgz#fed3eed4ac3d82cfba81e9430855bfed189b64bb" - integrity sha512-VYiCbApDDRUVx3k0jtZ+b5h2hMkMKZpPR9tx+VgVA3Euuf2MVjVsjx/S2+4AlJjKjS5J6z9+4bEvtponK96e4A== + version "6.7.1" + resolved "https://registry.yarnpkg.com/@codemirror/lang-sql/-/lang-sql-6.7.1.tgz#314211eb79fbba96b4dd0d24fa954be9803368ab" + integrity sha512-flQa7zemrLKk0TIrOJnpeyH/b29BcVybtsTeZMgAo40O6kGbrnUSCgwI3TF5iJY3O9VXJKKCA+i0CBVvDfr88w== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/language" "^6.0.0" "@codemirror/state" "^6.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@codemirror/lang-vue@^0.1.1": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@codemirror/lang-vue/-/lang-vue-0.1.2.tgz#50aec87b93ba8a6b0742a24cbab566b3989ee6ca" - integrity sha512-D4YrefiRBAr+CfEIM4S3yvGSbYW+N69mttIfGMEf7diHpRbmygDxS+R/5xSqjgtkY6VO6qmUrre1GkRcWeZa9A== + version "0.1.3" + resolved "https://registry.yarnpkg.com/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz#bf79b9152cc18b4903d64c1f67e186ae045c8a97" + integrity sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug== dependencies: "@codemirror/lang-html" "^6.0.0" "@codemirror/lang-javascript" "^6.1.2" "@codemirror/language" "^6.0.0" - "@lezer/common" "^1.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.3.1" "@codemirror/lang-wast@^6.0.0": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@codemirror/lang-wast/-/lang-wast-6.0.1.tgz#c15bec84548a5e9b0a43fa69fb63631d087d6047" - integrity sha512-sQLsqhRjl2MWG3rxZysX+2XAyed48KhLBHLgq9xcKxIJu3npH/G+BIXW5NM5mHeDUjG0jcGh9BcjP0NfMStuzA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz#d2b14175e5e80d7878cbbb29e20ec90dc12d3a2b" + integrity sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q== dependencies: "@codemirror/language" "^6.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@codemirror/lang-xml@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@codemirror/lang-xml/-/lang-xml-6.0.2.tgz#66f75390bf8013fd8645db9cdd0b1d177e0777a4" - integrity sha512-JQYZjHL2LAfpiZI2/qZ/qzDuSqmGKMwyApYmEUUCTxLM4MWS7sATUEfIguZQr9Zjx/7gcdnewb039smF6nC2zw== + version "6.1.0" + resolved "https://registry.yarnpkg.com/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz#e3e786e1a89fdc9520efe75c1d6d3de1c40eb91c" + integrity sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/language" "^6.4.0" "@codemirror/state" "^6.0.0" + "@codemirror/view" "^6.0.0" "@lezer/common" "^1.0.0" "@lezer/xml" "^1.0.0" +"@codemirror/lang-yaml@^6.0.0": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@codemirror/lang-yaml/-/lang-yaml-6.1.1.tgz#6f6e4e16c5a4e6d549f462c9dc2053439e070d0d" + integrity sha512-HV2NzbK9bbVnjWxwObuZh5FuPCowx51mEfoFT9y3y+M37fA3+pbxx4I7uePuygFzDsAmCTwQSc/kXh/flab4uw== + dependencies: + "@codemirror/autocomplete" "^6.0.0" + "@codemirror/language" "^6.0.0" + "@codemirror/state" "^6.0.0" + "@lezer/common" "^1.2.0" + "@lezer/highlight" "^1.2.0" + "@lezer/yaml" "^1.0.0" + "@codemirror/language-data@^6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@codemirror/language-data/-/language-data-6.3.1.tgz#795ec09e04260868070296241363d70f4060bb36" - integrity sha512-p6jhJmvhGe1TG1EGNhwH7nFWWFSTJ8NDKnB2fVx5g3t+PpO0+63R7GJNxjS0TmmH3cdMxZbzejsik+rlEh1EyQ== + version "6.5.1" + resolved "https://registry.yarnpkg.com/@codemirror/language-data/-/language-data-6.5.1.tgz#5cb9413d5225ef27a577c23781bbc0b36c58bb67" + integrity sha512-0sWxeUSNlBr6OmkqybUTImADFUP0M3P0IiSde4nc24bz/6jIYzqYSgkOSLS+CBIoW1vU8Q9KUWXscBXeoMVC9w== dependencies: "@codemirror/lang-angular" "^0.1.0" "@codemirror/lang-cpp" "^6.0.0" "@codemirror/lang-css" "^6.0.0" + "@codemirror/lang-go" "^6.0.0" "@codemirror/lang-html" "^6.0.0" "@codemirror/lang-java" "^6.0.0" "@codemirror/lang-javascript" "^6.0.0" "@codemirror/lang-json" "^6.0.0" "@codemirror/lang-less" "^6.0.0" + "@codemirror/lang-liquid" "^6.0.0" "@codemirror/lang-markdown" "^6.0.0" "@codemirror/lang-php" "^6.0.0" "@codemirror/lang-python" "^6.0.0" @@ -1698,32 +1750,33 @@ "@codemirror/lang-vue" "^0.1.1" "@codemirror/lang-wast" "^6.0.0" "@codemirror/lang-xml" "^6.0.0" + "@codemirror/lang-yaml" "^6.0.0" "@codemirror/language" "^6.0.0" - "@codemirror/legacy-modes" "^6.1.0" + "@codemirror/legacy-modes" "^6.4.0" "@codemirror/language@^6.0.0", "@codemirror/language@^6.3.0", "@codemirror/language@^6.4.0", "@codemirror/language@^6.6.0", "@codemirror/language@^6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.8.0.tgz#f2d7eea6b338c25593d800f2293b062d9f9856db" - integrity sha512-r1paAyWOZkfY0RaYEZj3Kul+MiQTEbDvYqf8gPGaRvNneHXCmfSaAVFjwRUPlgxS8yflMxw2CTu6uCMp8R8A2g== + version "6.10.2" + resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.10.2.tgz#4056dc219619627ffe995832eeb09cea6060be61" + integrity sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA== dependencies: "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.0.0" - "@lezer/common" "^1.0.0" + "@codemirror/view" "^6.23.0" + "@lezer/common" "^1.1.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" style-mod "^4.0.0" -"@codemirror/legacy-modes@^6.1.0": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@codemirror/legacy-modes/-/legacy-modes-6.3.3.tgz#d7827c76c9533efdc76f7d0a0fc866f5acd4b764" - integrity sha512-X0Z48odJ0KIoh/HY8Ltz75/4tDYc9msQf1E/2trlxFaFFhgjpVHjZ/BCXe1Lk7s4Gd67LL/CeEEHNI+xHOiESg== +"@codemirror/legacy-modes@^6.4.0": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@codemirror/legacy-modes/-/legacy-modes-6.4.1.tgz#fae7b03cad1beada637fd3c12c568a3a7f63fe89" + integrity sha512-vdg3XY7OAs5uLDx2Iw+cGfnwtd7kM+Et/eMsqAGTfT/JKiVBQZXosTzjEbWAi/FrY6DcQIz8mQjBozFHZEUWQA== dependencies: "@codemirror/language" "^6.0.0" "@codemirror/lint@^6.0.0": - version "6.4.0" - resolved "https://registry.yarnpkg.com/@codemirror/lint/-/lint-6.4.0.tgz#3507e937aa9415ef0831ff04734ef0e736e75014" - integrity sha512-6VZ44Ysh/Zn07xrGkdtNfmHCbGSHZzFBdzWi0pbd7chAQ/iUcpLGX99NYRZTa7Ugqg4kEHCqiHhcZnH0gLIgSg== + version "6.8.1" + resolved "https://registry.yarnpkg.com/@codemirror/lint/-/lint-6.8.1.tgz#6427848815baaf68c08e98c7673b804d3d8c0e7f" + integrity sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg== dependencies: "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" @@ -1738,18 +1791,18 @@ "@codemirror/view" "^6.0.0" "@codemirror/search@^6.0.0": - version "6.5.0" - resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.5.0.tgz#308f9968434e0e6ed59c9ec36a0239eb1dfc5d92" - integrity sha512-64/M40YeJPToKvGO6p3fijo2vwUEj4nACEAXElCaYQ50HrXSvRaK+NHEhSh73WFBGdvIdhrV+lL9PdJy2RfCYA== + version "6.5.6" + resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.5.6.tgz#8f858b9e678d675869112e475f082d1e8488db93" + integrity sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q== dependencies: "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" crelt "^1.0.5" -"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.1.4", "@codemirror/state@^6.2.0", "@codemirror/state@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.2.1.tgz#6dc8d8e5abb26b875e3164191872d69a5e85bd73" - integrity sha512-RupHSZ8+OjNT38zU9fKH2sv+Dnlr8Eb8sl4NOnnqz95mCFTZUaiRP8Xv5MeeaG0px2b8Bnfe7YGwCV3nsBhbuw== +"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.2.1", "@codemirror/state@^6.4.0": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.4.1.tgz#da57143695c056d9a3c38705ed34136e2b68171b" + integrity sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A== "@codemirror/theme-one-dark@^6.0.0": version "6.1.2" @@ -1761,13 +1814,13 @@ "@codemirror/view" "^6.0.0" "@lezer/highlight" "^1.0.0" -"@codemirror/view@^6.0.0", "@codemirror/view@^6.15.3", "@codemirror/view@^6.2.2", "@codemirror/view@^6.6.0": - version "6.15.3" - resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.15.3.tgz#b26dac3e1812821daa6da25f59ffb26c9b9b75f3" - integrity sha512-chNgR8H7Ipx7AZUt0+Kknk7BCow/ron3mHd1VZdM7hQXiI79+UlWqcxpCiexTxZQ+iSkqndk3HHAclJOcjSuog== +"@codemirror/view@^6.0.0", "@codemirror/view@^6.15.3", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0": + version "6.33.0" + resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.33.0.tgz#51e270410fc3af92a6e38798e80ebf8add7dc3ec" + integrity sha512-AroaR3BvnjRW8fiZBalAaK+ZzB5usGgI014YKElYZvQdNH5ZIidHlO+cyf/2rWzyBFRkvG6VhiXeAEbC53P2YQ== dependencies: - "@codemirror/state" "^6.1.4" - style-mod "^4.0.0" + "@codemirror/state" "^6.4.0" + style-mod "^4.1.0" w3c-keyname "^2.2.4" "@colors/colors@1.5.0": @@ -2635,122 +2688,150 @@ resolved "https://registry.yarnpkg.com/@ldapjs/protocol/-/protocol-1.2.1.tgz#d58d371d6958f28095e8de23b35341bcaba55cf3" integrity sha512-O89xFDLW2gBoZWNXuXpBSM32/KealKCTb3JGtJdtUQc7RjAk8XzrRgyz02cPAwGKwKPxy0ivuC7UP9bmN87egQ== -"@lezer/common@^1.0.0", "@lezer/common@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.0.3.tgz#1808f70e2b0a7b1fdcbaf5c074723d2d4ed1e4c5" - integrity sha512-JH4wAXCgUOcCGNekQPLhVeUtIqjH0yPBs7vvUdSjyQama9618IOKFJwkv2kcqdhF0my8hQEgCTEJU0GIgnahvA== +"@lezer/common@^1.0.0", "@lezer/common@^1.0.2", "@lezer/common@^1.1.0", "@lezer/common@^1.2.0", "@lezer/common@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.2.1.tgz#198b278b7869668e1bebbe687586e12a42731049" + integrity sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ== "@lezer/cpp@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@lezer/cpp/-/cpp-1.1.1.tgz#ac0261f48dc3651bfea13fdaeff35f04c9011a7f" - integrity sha512-eS1M3L3U2mDowoFVPG7tEp01SWu9/68Nx3HEBgLJVn3N9ku7g5S7WdFv0jzmcTipAyONYfZJ+7x4WRkfdB2Ung== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@lezer/cpp/-/cpp-1.1.2.tgz#1db93b09e011e8a7a08c347c9d5b7749971253bf" + integrity sha512-macwKtyeUO0EW86r3xWQCzOV9/CF8imJLpJlPv3sDY57cPGeUZ8gXWOWNlJr52TVByMV3PayFQCA5SHEERDmVQ== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/css@^1.0.0", "@lezer/css@^1.1.0": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@lezer/css/-/css-1.1.3.tgz#605495b00fd8a122088becf196a93744cbe817fc" - integrity sha512-SjSM4pkQnQdJDVc80LYzEaMiNy9txsFbI7HsMgeVF28NdLaAdHNtQ+kB/QqDUzRBV/75NTXjJ/R5IdC8QQGxMg== + version "1.1.8" + resolved "https://registry.yarnpkg.com/@lezer/css/-/css-1.1.8.tgz#11fd456dac53bc899b266778794ed4ca9576a5a4" + integrity sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" -"@lezer/highlight@^1.0.0", "@lezer/highlight@^1.1.3": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@lezer/highlight/-/highlight-1.1.6.tgz#87e56468c0f43c2a8b3dc7f0b7c2804b34901556" - integrity sha512-cmSJYa2us+r3SePpRCjN5ymCqCPv+zyXmDl0ciWtVaNiORT/MxM7ZgOMQZADD0o51qOaOg24qc/zBViOIwAjJg== +"@lezer/go@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@lezer/go/-/go-1.0.0.tgz#26cd2463f8583e630f52e714dca6d7420c5f7d7e" + integrity sha512-co9JfT3QqX1YkrMmourYw2Z8meGC50Ko4d54QEcQbEYpvdUvN4yb0NBZdn/9ertgvjsySxHsKzH3lbm3vqJ4Jw== + dependencies: + "@lezer/common" "^1.2.0" + "@lezer/highlight" "^1.0.0" + "@lezer/lr" "^1.0.0" + +"@lezer/highlight@^1.0.0", "@lezer/highlight@^1.1.3", "@lezer/highlight@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@lezer/highlight/-/highlight-1.2.1.tgz#596fa8f9aeb58a608be0a563e960c373cbf23f8b" + integrity sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA== dependencies: "@lezer/common" "^1.0.0" "@lezer/html@^1.3.0": - version "1.3.6" - resolved "https://registry.yarnpkg.com/@lezer/html/-/html-1.3.6.tgz#26a2a17da4e0f91835e36db9ccd025b2ed8d33f7" - integrity sha512-Kk9HJARZTc0bAnMQUqbtuhFVsB4AnteR2BFUWfZV7L/x1H0aAKz6YabrfJ2gk/BEgjh9L3hg5O4y2IDZRBdzuQ== + version "1.3.10" + resolved "https://registry.yarnpkg.com/@lezer/html/-/html-1.3.10.tgz#1be9a029a6fe835c823b20a98a449a630416b2af" + integrity sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w== dependencies: - "@lezer/common" "^1.0.0" + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/java@^1.0.0": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@lezer/java/-/java-1.0.4.tgz#f31f5af4bfc40475dc886f0e3e2d291889b87d25" - integrity sha512-POc53LHf2AuNeRXjqZbXNu88GKj0KZTjjSx0L7tYeXlrEHF+3NAQx+dEwKVuCbkl0ZMtpRy2VsDYOV7KKV0oyg== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@lezer/java/-/java-1.1.2.tgz#01a6ffefa9a692ac6cd492f8b924009edcb903d7" + integrity sha512-3j8X70JvYf0BZt8iSRLXLkt0Ry1hVUgH6wT32yBxH/Xi55nW2VMhc1Az4SKwu4YGSmxCm1fsqDDcHTuFjC8pmg== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/javascript@^1.0.0": - version "1.4.5" - resolved "https://registry.yarnpkg.com/@lezer/javascript/-/javascript-1.4.5.tgz#4ab56dbcbff3e58ef331294a549903a5dd8d154a" - integrity sha512-FmBUHz8K1V22DgjTd6SrIG9owbzOYZ1t3rY6vGEmw+e2RVBd7sqjM8uXEVRFmfxKFn1Mx2ABJehHjrN3G2ZpmA== + version "1.4.17" + resolved "https://registry.yarnpkg.com/@lezer/javascript/-/javascript-1.4.17.tgz#8456e369f960c328b9e823342d0c72d704238c31" + integrity sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.1.3" "@lezer/lr" "^1.3.0" "@lezer/json@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@lezer/json/-/json-1.0.1.tgz#3bf5641f3d1408ec31a5f9b29e4e96c6e3a232e6" - integrity sha512-nkVC27qiEZEjySbi6gQRuMwa2sDu2PtfjSgz0A4QF81QyRGm3kb2YRzLcOPcTEtmcwvrX/cej7mlhbwViA4WJw== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@lezer/json/-/json-1.0.2.tgz#bdc849e174113e2d9a569a5e6fb1a27e2f703eaf" + integrity sha512-xHT2P4S5eeCYECyKNPhr4cbEL9tc8w83SPwRC373o9uEdrvGKTZoJVAGxpOsZckMlEh9W23Pc72ew918RWQOBQ== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" -"@lezer/lr@^1.0.0", "@lezer/lr@^1.1.0", "@lezer/lr@^1.3.0", "@lezer/lr@^1.3.1", "@lezer/lr@^1.3.3": - version "1.3.9" - resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.3.9.tgz#cb299816d1c58efcca23ebbeb70bb4204fdd001b" - integrity sha512-XPz6dzuTHlnsbA5M2DZgjflNQ+9Hi5Swhic0RULdp3oOs3rh6bqGZolosVqN/fQIT8uNiepzINJDnS39oweTHQ== +"@lezer/lr@^1.0.0", "@lezer/lr@^1.1.0", "@lezer/lr@^1.3.0", "@lezer/lr@^1.3.1", "@lezer/lr@^1.3.3", "@lezer/lr@^1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.4.2.tgz#931ea3dea8e9de84e90781001dae30dea9ff1727" + integrity sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA== dependencies: "@lezer/common" "^1.0.0" "@lezer/markdown@^1.0.0": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@lezer/markdown/-/markdown-1.0.5.tgz#42f3e078ff64f436727482bef83741321cd1af1a" - integrity sha512-J0LRA0l21Ec6ZroaOxjxsWWm+swCOFHcnOU85Z7aH9nj3eJx5ORmtzVkWzs9e21SZrdvyIzM1gt+YF/HnqbvnA== + version "1.3.0" + resolved "https://registry.yarnpkg.com/@lezer/markdown/-/markdown-1.3.0.tgz#a954d48aa3256d07173353f80086f1a3bc6f965f" + integrity sha512-ErbEQ15eowmJUyT095e9NJc3BI9yZ894fjSDtHftD0InkfUBGgnKSU6dvan9jqsZuNHg2+ag/1oyDRxNsENupQ== dependencies: "@lezer/common" "^1.0.0" "@lezer/highlight" "^1.0.0" "@lezer/php@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@lezer/php/-/php-1.0.1.tgz#4496b58c980ca710c0433fd743d27e9964fd74ea" - integrity sha512-aqdCQJOXJ66De22vzdwnuC502hIaG9EnPK2rSi+ebXyUd+j7GAX1mRjWZOVOmf3GST1YUfUCu6WXDiEgDGOVwA== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@lezer/php/-/php-1.0.2.tgz#7c291631fc1e7f7efe99977522bc48bdc732658a" + integrity sha512-GN7BnqtGRpFyeoKSEqxvGvhJQiI4zkgmYnDk/JIyc7H7Ifc1tkPnUn/R2R8meH3h/aBf5rzjvU8ZQoyiNDtDrA== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.1.0" "@lezer/python@^1.1.4": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@lezer/python/-/python-1.1.8.tgz#fe8d03d6cbc95a1d5625cffd30d78018ee816633" - integrity sha512-1T/XsmeF57ijrjpC0Zmrf9YeO5mn2zC1XeSNrOnc0KB+6PgxJ5m7kWKt0CnwyS74oHQXbJxUUL+QDQJR26c1Gw== + version "1.1.14" + resolved "https://registry.yarnpkg.com/@lezer/python/-/python-1.1.14.tgz#a0887086fb7645cd09ada38ed748ca1d968e6363" + integrity sha512-ykDOb2Ti24n76PJsSa4ZoDF0zH12BSw1LGfQXCYJhJyOGiFTfGaX0Du66Ze72R+u/P35U+O6I9m8TFXov1JzsA== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/rust@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@lezer/rust/-/rust-1.0.1.tgz#ac2d7263fe22527e621bb5623929ba6d6c3a29ea" - integrity sha512-j+ToFKM6Wpglv3OQ4ebHYdYIMT2dh0ziCCV0rTf47AWiHOVhR0WjaKrBq+yuvDQNEhr5sxPxVI7+naJIgpqcsQ== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@lezer/rust/-/rust-1.0.2.tgz#cc9a75605d67182a0e799ac40b1965a61dcc6ef0" + integrity sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/sass@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@lezer/sass/-/sass-1.0.3.tgz#17e5d27e40979bc8b4aec8d05df0d01f745aedb8" - integrity sha512-n4l2nVOB7gWiGU/Cg2IVxpt2Ic9Hgfgy/7gk+p/XJibAsPXs0lSbsfGwQgwsAw9B/euYo3oS6lEFr9WytoqcZg== + version "1.0.6" + resolved "https://registry.yarnpkg.com/@lezer/sass/-/sass-1.0.6.tgz#2ba5294c6995023988e7971fc04757bc0d83b120" + integrity sha512-w/RCO2dIzZH1To8p+xjs8cE+yfgGus8NZ/dXeWl/QzHyr+TeBs71qiE70KPImEwvTsmEjoWh0A5SxMzKd5BWBQ== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" "@lezer/xml@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@lezer/xml/-/xml-1.0.2.tgz#5c934602d1d3565fdaf04e93b534c8b94f4df2d1" - integrity sha512-dlngsWceOtQBMuBPw5wtHpaxdPJ71aVntqjbpGkFtWsp4WtQmCnuTjQGocviymydN6M18fhj6UQX3oiEtSuY7w== + version "1.0.5" + resolved "https://registry.yarnpkg.com/@lezer/xml/-/xml-1.0.5.tgz#4bb7fd3e527f41b78372477aa753f035b41c3846" + integrity sha512-VFouqOzmUWfIg+tfmpcdV33ewtK+NSwd4ngSe1aG7HFb4BN0ExyY1b8msp+ndFrnlG4V4iC8yXacjFtrwERnaw== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" +"@lezer/yaml@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@lezer/yaml/-/yaml-1.0.3.tgz#b23770ab42b390056da6b187d861b998fd60b1ff" + integrity sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA== + dependencies: + "@lezer/common" "^1.2.0" + "@lezer/highlight" "^1.0.0" + "@lezer/lr" "^1.4.0" + "@lykmapipo/common@>=0.34.2", "@lykmapipo/common@>=0.34.3": version "0.34.3" resolved "https://registry.yarnpkg.com/@lykmapipo/common/-/common-0.34.3.tgz#eb74fa4af14f2f1e59ddd42491f05ab69f96bd71" @@ -4893,10 +4974,10 @@ "@typescript-eslint/types" "5.59.7" eslint-visitor-keys "^3.3.0" -"@uiw/codemirror-extensions-basic-setup@4.21.8": - version "4.21.8" - resolved "https://registry.yarnpkg.com/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.21.8.tgz#89980ffd4801b29984162ab4c44203b4d29038ae" - integrity sha512-uOPRPxexapuvlZ+hkVun5oyhQ0AtXIapBqv56cgjkzwZ49EILUk9mTubHFBY0B5kPqme7d57hSXYRLW8EH80LA== +"@uiw/codemirror-extensions-basic-setup@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.23.0.tgz#c3c181153335c208a25d59b8ecbc7fc87fe85356" + integrity sha512-+k5nkRpUWGaHr1JWT8jcKsVewlXw5qBgSopm9LW8fZ6KnSNZBycz8kHxh0+WSvckmXEESGptkIsb7dlkmJT/hQ== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/commands" "^6.0.0" @@ -4907,38 +4988,38 @@ "@codemirror/view" "^6.0.0" "@uiw/codemirror-theme-eclipse@^4.21.21": - version "4.21.21" - resolved "https://registry.yarnpkg.com/@uiw/codemirror-theme-eclipse/-/codemirror-theme-eclipse-4.21.21.tgz#d38cf20ce903b7aecefb9dbe1751a240590f154f" - integrity sha512-Dp5j4mFPH8UOoH37b2Wc45khNGcyusCDbfRw0jeBAGW258xH4UbHBlEIY+1/z4bloIfoguCyE3nPQnsa/M59Qg== + version "4.23.0" + resolved "https://registry.yarnpkg.com/@uiw/codemirror-theme-eclipse/-/codemirror-theme-eclipse-4.23.0.tgz#22c66297e6b5ca944528c84a46943d846694a2aa" + integrity sha512-P48jiLcaIdNJKWMgG/oH9pP6a8w5lW8lM7VWoCAfSs+v0Sj7ErJGtODGQFcOX0pzI7bc64Se5oNMWPMrtQf3Zw== dependencies: - "@uiw/codemirror-themes" "4.21.21" + "@uiw/codemirror-themes" "4.23.0" "@uiw/codemirror-theme-kimbie@^4.21.21": - version "4.21.21" - resolved "https://registry.yarnpkg.com/@uiw/codemirror-theme-kimbie/-/codemirror-theme-kimbie-4.21.21.tgz#dbdfc23c3957d55015ab5b0463526abffe73d816" - integrity sha512-dhWqIz1nsFzqoe5U3jIPeCJ9/c534YMmsGvNq3JJgRjD/KZeV8TSOJfuJNxI6jCskXh149Z5wghKE+FnNp/eUA== + version "4.23.0" + resolved "https://registry.yarnpkg.com/@uiw/codemirror-theme-kimbie/-/codemirror-theme-kimbie-4.23.0.tgz#df24bb54947b9d058a1ba146206c644ff982400a" + integrity sha512-hARic9WzsVSrT3uiuZeYSxyLmNU2LgoCD7hWauOJZm7HQ2EylVKV+xmcg/WkWMOCCyOZYRxn/pd0NWjRQmMVsA== dependencies: - "@uiw/codemirror-themes" "4.21.21" + "@uiw/codemirror-themes" "4.23.0" -"@uiw/codemirror-themes@4.21.21", "@uiw/codemirror-themes@^4.21.21": - version "4.21.21" - resolved "https://registry.yarnpkg.com/@uiw/codemirror-themes/-/codemirror-themes-4.21.21.tgz#26efb06ecce9a51aa73d39311c90f8fcb06fdc43" - integrity sha512-ljVcMGdaxo75UaH+EqxJ+jLyMVVgeSfW2AKyT1VeLy+4SDpuqNQ7wq5XVxktsG6LH+OvgSFndWXgPANf4+gQcA== +"@uiw/codemirror-themes@4.23.0", "@uiw/codemirror-themes@^4.21.21": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@uiw/codemirror-themes/-/codemirror-themes-4.23.0.tgz#cc5b5242d3e67caf49c2a9120e804b16ad79f86d" + integrity sha512-9fiji9xooZyBQozR1i6iTr56YP7j/Dr/VgsNWbqf5Szv+g+4WM1iZuiDGwNXmFMWX8gbkDzp6ASE21VCPSofWw== dependencies: "@codemirror/language" "^6.0.0" "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" "@uiw/react-codemirror@^4.21.8": - version "4.21.8" - resolved "https://registry.yarnpkg.com/@uiw/react-codemirror/-/react-codemirror-4.21.8.tgz#0b2d833a0c7256c23f83b342463276c762863bad" - integrity sha512-IwnWdZcBkNIHrQie/AAsBoz2Q/XpWe/Up1nGIrpWxMXEE/+RxW3CIkqcYEwVcYDJlbfP3hcIRqN/Aoz6OeXc5Q== + version "4.23.0" + resolved "https://registry.yarnpkg.com/@uiw/react-codemirror/-/react-codemirror-4.23.0.tgz#5eeadcd5de61213ad76ac3c772fffb7e5b54b465" + integrity sha512-MnqTXfgeLA3fsUUQjqjJgemEuNyoGALgsExVm0NQAllAAi1wfj+IoKFeK+h3XXMlTFRCFYOUh4AHDv0YXJLsOg== dependencies: "@babel/runtime" "^7.18.6" "@codemirror/commands" "^6.1.0" "@codemirror/state" "^6.1.1" "@codemirror/theme-one-dark" "^6.0.0" - "@uiw/codemirror-extensions-basic-setup" "4.21.8" + "@uiw/codemirror-extensions-basic-setup" "4.23.0" codemirror "^6.0.0" "@vitejs/plugin-react@^4.3.1": @@ -15899,9 +15980,9 @@ regenerator-runtime@^0.13.4: integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -17446,10 +17527,10 @@ stubs@^3.0.0: resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= -style-mod@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/style-mod/-/style-mod-4.0.3.tgz#136c4abc905f82a866a18b39df4dc08ec762b1ad" - integrity sha512-78Jv8kYJdjbvRwwijtCevYADfsI0lGzYJe4mMFdceO8l75DFFDoqBhR1jVDicDRRaX4//g1u9wKeo+ztc2h1Rw== +style-mod@^4.0.0, style-mod@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/style-mod/-/style-mod-4.1.2.tgz#ca238a1ad4786520f7515a8539d5a63691d7bf67" + integrity sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw== style-to-object@^0.3.0: version "0.3.0" From 13957f2b57685427b2477f80f6b69f0361bfa09a Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Mon, 26 Aug 2024 06:59:28 +0000 Subject: [PATCH 06/81] size change --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 6342f21ee8b..16a018604a8 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -31,7 +31,7 @@ const TreeForModalWrapper = memo((props: { children: JSX.Element }) => { const { children } = props; return (
- + { children }
@@ -98,7 +98,7 @@ export const PageSelectModal: FC = () => { isOpen={isOpened} toggle={closeModal} centered - size="sm" + size="lg" > {t('page_select_modal.select_page_location')} From 51c564649c3900c3da05bbc25f59ad1af4355ffc Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 26 Aug 2024 07:09:09 +0000 Subject: [PATCH 07/81] imprv --- apps/app/src/server/models/page.ts | 17 ++++++++++++++--- apps/app/src/server/routes/apiv3/pages/index.js | 6 ++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 881029ddca0..46cd523ad7d 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -414,19 +414,30 @@ export class PageQueryBuilder { } // add viewer condition to PageQueryBuilder instance - async addViewerCondition(user, userGroups = null, includeAnyoneWithTheLink = false): Promise { + async addViewerCondition( + user, + userGroups = null, + includeAnyoneWithTheLink = false, + showPagesRestrictedByOwner = false, + showPagesRestrictedByGroup = false, + ): Promise { const relatedUserGroups = (user != null && userGroups == null) ? [ ...(await UserGroupRelation.findAllUserGroupIdsRelatedToUser(user)), ...(await ExternalUserGroupRelation.findAllUserGroupIdsRelatedToUser(user)), ] : userGroups; - this.addConditionToFilteringByViewer(user, relatedUserGroups, includeAnyoneWithTheLink); + this.addConditionToFilteringByViewer(user, relatedUserGroups, includeAnyoneWithTheLink, showPagesRestrictedByOwner, showPagesRestrictedByGroup); return this; } addConditionToFilteringByViewer( user, userGroups: ObjectIdLike[] | null, includeAnyoneWithTheLink = false, showPagesRestrictedByOwner = false, showPagesRestrictedByGroup = false, ): PageQueryBuilder { + + console.log('showPagesRestrictedByOwner:', showPagesRestrictedByOwner); + console.log('showPagesRestrictedByGroup:', showPagesRestrictedByGroup); + + const condition = generateGrantCondition(user, userGroups, includeAnyoneWithTheLink, showPagesRestrictedByOwner, showPagesRestrictedByGroup); this.query = this.query @@ -690,7 +701,7 @@ schema.statics.findRecentUpdatedPages = async function( queryBuilder.addConditionToListWithDescendants(path, options); queryBuilder.populateDataToList(User.USER_FIELDS_EXCEPT_CONFIDENTIAL); - await queryBuilder.addViewerCondition(user); + await queryBuilder.addViewerCondition(user, undefined, undefined, !options.hideRestrictedByOwner, !options.hideRestrictedByGroup); const pages = await Page.paginate(queryBuilder.query.clone(), { lean: true, sort: sortOpt, offset: options.offset, limit: options.limit, }); diff --git a/apps/app/src/server/routes/apiv3/pages/index.js b/apps/app/src/server/routes/apiv3/pages/index.js index 8e76a934959..a46c4a5e49d 100644 --- a/apps/app/src/server/routes/apiv3/pages/index.js +++ b/apps/app/src/server/routes/apiv3/pages/index.js @@ -226,6 +226,9 @@ module.exports = (crowi) => { const offset = parseInt(req.query.offset) || 0; const includeWipPage = req.query.includeWipPage === 'true'; // Need validation using express-validator + const hideRestrictedByOwner = await crowi.configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByOwner'); + const hideRestrictedByGroup = await crowi.configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByGroup'); + const queryOptions = { offset, limit, @@ -234,7 +237,10 @@ module.exports = (crowi) => { isRegExpEscapedFromPath: true, sort: 'updatedAt', desc: -1, + hideRestrictedByOwner, + hideRestrictedByGroup, }; + try { const result = await Page.findRecentUpdatedPages('/', req.user, queryOptions); if (result.pages.length > limit) { From 30626d6b4e75ae025797f3d23454e28c55792af7 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 26 Aug 2024 07:35:41 +0000 Subject: [PATCH 08/81] rm debug log --- apps/app/src/server/models/page.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 46cd523ad7d..2d9aea13180 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -433,11 +433,6 @@ export class PageQueryBuilder { addConditionToFilteringByViewer( user, userGroups: ObjectIdLike[] | null, includeAnyoneWithTheLink = false, showPagesRestrictedByOwner = false, showPagesRestrictedByGroup = false, ): PageQueryBuilder { - - console.log('showPagesRestrictedByOwner:', showPagesRestrictedByOwner); - console.log('showPagesRestrictedByGroup:', showPagesRestrictedByGroup); - - const condition = generateGrantCondition(user, userGroups, includeAnyoneWithTheLink, showPagesRestrictedByOwner, showPagesRestrictedByGroup); this.query = this.query From b0bd739c32d478fa39899a8f16d4d53f3ccdf0ad Mon Sep 17 00:00:00 2001 From: GitHub Action <> Date: Mon, 26 Aug 2024 08:11:32 +0000 Subject: [PATCH 09/81] Bump version --- apps/app/package.json | 2 +- apps/slackbot-proxy/package.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index 5afb934b1fa..34708e1d52c 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -1,6 +1,6 @@ { "name": "@growi/app", - "version": "7.0.17", + "version": "7.0.18-RC.0", "license": "MIT", "private": "true", "scripts": { diff --git a/apps/slackbot-proxy/package.json b/apps/slackbot-proxy/package.json index 39052383811..e0526f3b240 100644 --- a/apps/slackbot-proxy/package.json +++ b/apps/slackbot-proxy/package.json @@ -1,6 +1,6 @@ { "name": "@growi/slackbot-proxy", - "version": "7.0.17-slackbot-proxy.0", + "version": "7.0.18-slackbot-proxy.0", "license": "MIT", "private": "true", "scripts": { diff --git a/package.json b/package.json index e39928ea299..50cf60e4767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growi", - "version": "7.0.17", + "version": "7.0.18-RC.0", "description": "Team collaboration software using markdown", "license": "MIT", "private": "true", From c57e00dda69d336b9806609b5331947057062999 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 26 Aug 2024 08:47:41 +0000 Subject: [PATCH 10/81] Also supported by pageTree --- apps/app/src/server/routes/apiv3/page-listing.ts | 9 ++++++++- apps/app/src/server/service/page/index.ts | 11 ++++++++--- apps/app/src/server/service/page/page-service.ts | 4 +++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/app/src/server/routes/apiv3/page-listing.ts b/apps/app/src/server/routes/apiv3/page-listing.ts index 2c082c94b1a..caa3a65dcf1 100644 --- a/apps/app/src/server/routes/apiv3/page-listing.ts +++ b/apps/app/src/server/routes/apiv3/page-listing.ts @@ -9,6 +9,7 @@ import { query, oneOf } from 'express-validator'; import type { HydratedDocument } from 'mongoose'; import mongoose from 'mongoose'; +import { configManager } from '~/server/service/config-manager'; import type { IPageGrantService } from '~/server/service/page-grant'; import loggerFactory from '~/utils/logger'; @@ -18,6 +19,7 @@ import type { PageDocument, PageModel } from '../../models/page'; import type { ApiV3Response } from './interfaces/apiv3-response'; + const logger = loggerFactory('growi:routes:apiv3:page-tree'); /* @@ -103,8 +105,13 @@ const routerFactory = (crowi: Crowi): Router => { const pageService = crowi.pageService; + const hideRestrictedByOwner = await configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByOwner'); + const hideRestrictedByGroup = await configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByGroup'); + try { - const pages = await pageService.findChildrenByParentPathOrIdAndViewer((id || path)as string, req.user); + const pages = await pageService.findChildrenByParentPathOrIdAndViewer( + (id || path)as string, req.user, undefined, !hideRestrictedByOwner, !hideRestrictedByGroup, + ); return res.apiv3({ children: pages }); } catch (err) { diff --git a/apps/app/src/server/service/page/index.ts b/apps/app/src/server/service/page/index.ts index 3849d587cee..c984553bc79 100644 --- a/apps/app/src/server/service/page/index.ts +++ b/apps/app/src/server/service/page/index.ts @@ -4332,8 +4332,13 @@ class PageService implements IPageService { /* * Find all children by parent's path or id. Using id should be prioritized */ - async findChildrenByParentPathOrIdAndViewer(parentPathOrId: string, user, userGroups = null) - : Promise<(HydratedDocument & { processData?: IPageOperationProcessData })[]> { + async findChildrenByParentPathOrIdAndViewer( + parentPathOrId: string, + user, + userGroups = null, + showPagesRestrictedByOwner = false, + showPagesRestrictedByGroup = false, + ): Promise<(HydratedDocument & { processData?: IPageOperationProcessData })[]> { const Page = mongoose.model, PageModel>('Page'); let queryBuilder: PageQueryBuilder; if (hasSlash(parentPathOrId)) { @@ -4346,7 +4351,7 @@ class PageService implements IPageService { // Use $eq for user-controlled sources. see: https://codeql.github.com/codeql-query-help/javascript/js-sql-injection/#recommendation queryBuilder = new PageQueryBuilder(Page.find({ parent: { $eq: parentId } } as any), true); // TODO: improve type } - await queryBuilder.addViewerCondition(user, userGroups); + await queryBuilder.addViewerCondition(user, userGroups, undefined, showPagesRestrictedByOwner, showPagesRestrictedByGroup); const pages: HydratedDocument[] = await queryBuilder .addConditionToSortPagesByAscPath() diff --git a/apps/app/src/server/service/page/page-service.ts b/apps/app/src/server/service/page/page-service.ts index 21d6c28df91..90e80a517a4 100644 --- a/apps/app/src/server/service/page/page-service.ts +++ b/apps/app/src/server/service/page/page-service.ts @@ -21,7 +21,9 @@ export interface IPageService { getEventEmitter: () => EventEmitter, deleteMultipleCompletely: (pages: ObjectIdLike[], user: IUser | undefined) => Promise, findAncestorsChildrenByPathAndViewer(path: string, user, userGroups?): Promise>, - findChildrenByParentPathOrIdAndViewer(parentPathOrId: string, user, userGroups?): Promise, + findChildrenByParentPathOrIdAndViewer( + parentPathOrId: string, user, userGroups?, showPagesRestrictedByOwner?: boolean, showPagesRestrictedByGroup?: boolean, + ): Promise, shortBodiesMapByPageIds(pageIds?: Types.ObjectId[], user?): Promise>, constructBasicPageInfo(page: PageDocument, isGuestUser?: boolean): IPageInfo | Omit, normalizeAllPublicPages(): Promise, From fe24ca1b35aca69d416f4b674e3b6c3b564bf073 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 26 Aug 2024 11:24:23 +0000 Subject: [PATCH 11/81] Add type to queryOptions --- apps/app/src/server/models/page.ts | 16 ++++++++++++++-- apps/app/src/server/routes/apiv3/pages/index.js | 3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 2d9aea13180..98fb82559ad 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -65,6 +65,18 @@ type PaginatedPages = { offset: number } +export type FindRecentUpdatedPagesOption = { + offset: number, + limit: number, + includeWipPage: boolean, + includeTrashed: boolean, + isRegExpEscapedFromPath: boolean, + sort: 'updatedAt' + desc: number + hideRestrictedByOwner: boolean, + hideRestrictedByGroup: boolean, +} + export type CreateMethod = (path: string, body: string, user, options: IOptionsForCreate) => Promise> export interface PageModel extends Model { @@ -79,7 +91,7 @@ export interface PageModel extends Model { countByPathAndViewer(path: string | null, user, userGroups?, includeEmpty?:boolean): Promise findParentByPath(path: string | null): Promise | null> findTargetAndAncestorsByPathOrId(pathOrId: string): Promise - findRecentUpdatedPages(path: string, user, option, includeEmpty?: boolean): Promise + findRecentUpdatedPages(path: string, user, option: FindRecentUpdatedPagesOption, includeEmpty?: boolean): Promise generateGrantCondition( user, userGroups: ObjectIdLike[] | null, includeAnyoneWithTheLink?: boolean, showPagesRestrictedByOwner?: boolean, showPagesRestrictedByGroup?: boolean, ): { $or: any[] } @@ -670,7 +682,7 @@ schema.statics.countByPathAndViewer = async function(path: string | null, user, }; schema.statics.findRecentUpdatedPages = async function( - path: string, user, options, includeEmpty = false, + path: string, user, options: FindRecentUpdatedPagesOption, includeEmpty = false, ): Promise { const sortOpt = {}; diff --git a/apps/app/src/server/routes/apiv3/pages/index.js b/apps/app/src/server/routes/apiv3/pages/index.js index a46c4a5e49d..92dab4fde09 100644 --- a/apps/app/src/server/routes/apiv3/pages/index.js +++ b/apps/app/src/server/routes/apiv3/pages/index.js @@ -229,6 +229,9 @@ module.exports = (crowi) => { const hideRestrictedByOwner = await crowi.configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByOwner'); const hideRestrictedByGroup = await crowi.configManager.getConfig('crowi', 'security:list-policy:hideRestrictedByGroup'); + /** + * @type {import('~/server/models/page').FindRecentUpdatedPagesOption} + */ const queryOptions = { offset, limit, From 272dc2bd50798c56cc2f4058a16d8259b70f2e9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:19:29 +0000 Subject: [PATCH 12/81] ci(deps): bump unzip-stream from 0.3.1 to 0.3.2 Bumps [unzip-stream](https://github.com/mhr3/unzip-stream) from 0.3.1 to 0.3.2. - [Commits](https://github.com/mhr3/unzip-stream/compare/v0.3.1...v0.3.2) --- updated-dependencies: - dependency-name: unzip-stream dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- apps/app/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index 34708e1d52c..0377efc8eea 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -204,7 +204,7 @@ "uglifycss": "^0.0.29", "universal-bunyan": "^0.9.2", "unstated": "^2.1.1", - "unzip-stream": "^0.3.1", + "unzip-stream": "^0.3.2", "url-join": "^4.0.0", "usehooks-ts": "^2.6.0", "validator": "^13.7.0", diff --git a/yarn.lock b/yarn.lock index c71c226ffc2..0486e40c545 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18704,10 +18704,10 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -unzip-stream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/unzip-stream/-/unzip-stream-0.3.1.tgz#2333b5cd035d29db86fb701ca212cf8517400083" - integrity sha512-RzaGXLNt+CW+T41h1zl6pGz3EaeVhYlK+rdAap+7DxW5kqsqePO8kRtWPaCiVqdhZc86EctSPVYNix30YOMzmw== +unzip-stream@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/unzip-stream/-/unzip-stream-0.3.2.tgz#e7bfd887f4c9a284b46978693ba54e0d4f5095df" + integrity sha512-oWhfqwjx36ULFG+krfkbtbrc/BeEzaYrlqdEWa5EPNd6x6RerzuNW8aSTM0TtNtrOfUKYdO0TwrlkzrXAE6Olg== dependencies: binary "^0.3.0" mkdirp "^0.5.1" From b8bce7a063aba6820b7aede66e68ceae23a6f453 Mon Sep 17 00:00:00 2001 From: maeshinshin Date: Tue, 27 Aug 2024 19:25:34 +0900 Subject: [PATCH 13/81] fix type of grant and query --- apps/app/src/server/models/user-group-relation.ts | 2 +- apps/app/src/server/service/page-grant.ts | 2 +- apps/app/src/server/util/compare-objectId.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/src/server/models/user-group-relation.ts b/apps/app/src/server/models/user-group-relation.ts index e7f0a894672..040fa710cad 100644 --- a/apps/app/src/server/models/user-group-relation.ts +++ b/apps/app/src/server/models/user-group-relation.ts @@ -128,7 +128,7 @@ schema.statics.findAllRelationForUserGroups = function(userGroups) { * @memberof UserGroupRelation */ schema.statics.findAllGroupsForUser = async function(user): Promise { - const userGroupRelations = await this.find({ relatedUser: user.id }).populate('relatedGroup'); + const userGroupRelations = await this.find({ relatedUser: user._id }).populate('relatedGroup'); const userGroups = userGroupRelations.map((relation) => { return isPopulated(relation.relatedGroup) ? relation.relatedGroup as UserGroupDocument : null; }); diff --git a/apps/app/src/server/service/page-grant.ts b/apps/app/src/server/service/page-grant.ts index 192ac41c1b1..1050d29a150 100644 --- a/apps/app/src/server/service/page-grant.ts +++ b/apps/app/src/server/service/page-grant.ts @@ -276,7 +276,7 @@ class PageGrantService implements IPageGrantService { ).length === 0; if (!userBelongsToAllPreviousGrantedGroups) { - if (grant !== PageGrant.GRANT_USER_GROUP) { + if (Number(grant) !== PageGrant.GRANT_USER_GROUP) { return false; } const pageGrantIncludesUserRelatedGroup = hasIntersection(grantedGroups?.map(g => getIdForRef(g.item)) || [], userRelatedGroupIds); diff --git a/apps/app/src/server/util/compare-objectId.ts b/apps/app/src/server/util/compare-objectId.ts index a7c5231e4b0..d53c313467c 100644 --- a/apps/app/src/server/util/compare-objectId.ts +++ b/apps/app/src/server/util/compare-objectId.ts @@ -1,6 +1,6 @@ import mongoose from 'mongoose'; -import { ObjectIdLike } from '~/server/interfaces/mongoose-utils'; +import type { ObjectIdLike } from '~/server/interfaces/mongoose-utils'; type IObjectId = mongoose.Types.ObjectId; const ObjectId = mongoose.Types.ObjectId; From d7935a660becf1faeaac8ac7d62b14a96d21a67d Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Wed, 28 Aug 2024 01:30:39 +0000 Subject: [PATCH 14/81] omit unused components --- .../client/components/SearchForm.module.scss | 36 ----- apps/app/src/client/components/SearchForm.tsx | 143 ------------------ 2 files changed, 179 deletions(-) delete mode 100644 apps/app/src/client/components/SearchForm.module.scss delete mode 100644 apps/app/src/client/components/SearchForm.tsx diff --git a/apps/app/src/client/components/SearchForm.module.scss b/apps/app/src/client/components/SearchForm.module.scss deleted file mode 100644 index 335d5bae86d..00000000000 --- a/apps/app/src/client/components/SearchForm.module.scss +++ /dev/null @@ -1,36 +0,0 @@ -@use '@growi/core-styles/scss/bootstrap/init' as bs; - -.grw-search-table { - caption { - display: table-header-group; - } -} - -@include bs.media-breakpoint-down(sm) { - .grw-search-table { - th { - text-align: right; - } - - td { - overflow-wrap: anywhere; - white-space: normal !important; - } - - @include bs.media-breakpoint-down(xs) { - th, - td { - display: block; - } - - th { - text-align: left; - } - - td { - padding-top: 0 !important; - border-top: none !important; - } - } - } -} diff --git a/apps/app/src/client/components/SearchForm.tsx b/apps/app/src/client/components/SearchForm.tsx deleted file mode 100644 index 099cf333902..00000000000 --- a/apps/app/src/client/components/SearchForm.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import React, { - FC, forwardRef, ForwardRefRenderFunction, useImperativeHandle, - useRef, useState, -} from 'react'; - -import { useTranslation } from 'next-i18next'; - -import { IFocusable } from '~/client/interfaces/focusable'; -import { TypeaheadProps } from '~/client/interfaces/react-bootstrap-typeahead'; -import { IPageWithSearchMeta } from '~/interfaces/search'; - -import SearchTypeahead from './SearchTypeahead'; - -import styles from './SearchForm.module.scss'; - - -type SearchFormHelpProps = { - isReachable: boolean, -} - -const SearchFormHelp: FC = React.memo((props: SearchFormHelpProps) => { - const { t } = useTranslation(); - - const { isReachable } = props; - - if (!isReachable) { - return ( - <> -
Error occured on Search Service
- Try to reconnect from management page. - - ); - } - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
search{ t('search_help.title') }
-
- word1 word2

- ({ t('search_help.and.syntax help') }) -
{ t('search_help.and.desc', { word1: 'word1', word2: 'word2' }) }
- "This is GROWI"

- ({ t('search_help.phrase.syntax help') }) -
{ t('search_help.phrase.desc', { phrase: 'This is GROWI' }) }
-keyword
{ t('search_help.exclude.desc', { word: 'keyword' }) }
prefix:/user/
{ t('search_help.prefix.desc', { path: '/user/' }) }
-prefix:/user/
{ t('search_help.exclude_prefix.desc', { path: '/user/' }) }
tag:wiki
{ t('search_help.tag.desc', { tag: 'wiki' }) }
-tag:wiki
{ t('search_help.exclude_tag.desc', { tag: 'wiki' }) }
- ); -}); - -SearchFormHelp.displayName = 'SearchFormHelp'; - - -type Props = TypeaheadProps & { - isSearchServiceReachable: boolean, - - keywordOnInit?: string, - disableIncrementalSearch?: boolean, - onChange?: (data: IPageWithSearchMeta[]) => void, - onSubmit?: (input: string) => void, -}; - - -const SearchForm: ForwardRefRenderFunction = (props: Props, ref) => { - const { t } = useTranslation(); - const { - isSearchServiceReachable, - keywordOnInit, - disableIncrementalSearch, - dropup, onChange, onBlur, onFocus, onSubmit, onInputChange, - } = props; - - const [searchError, setSearchError] = useState(null); - - const searchTyheaheadRef = useRef(null); - - // publish focus() - useImperativeHandle(ref, () => ({ - focus() { - const instance = searchTyheaheadRef?.current; - if (instance != null) { - instance.focus(); - } - }, - })); - - const placeholder = isSearchServiceReachable - ? 'Search ...' - : 'Error on Search Service'; - - const emptyLabel = (searchError != null) - ? 'Error on searching.' - : t('search.search page bodies'); - - return ( - setSearchError(err)} - onBlur={onBlur} - onFocus={onFocus} - keywordOnInit={keywordOnInit} - disableIncrementalSearch={disableIncrementalSearch} - helpElement={} - /> - ); -}; - -export default forwardRef(SearchForm); From 106d2cc510766f8d92dad5c85d0a6122683863a8 Mon Sep 17 00:00:00 2001 From: maeshinshin Date: Wed, 28 Aug 2024 21:53:51 +0900 Subject: [PATCH 15/81] fix: Handle grant values as numbers and update grantedGroups in revisions --- apps/app/src/server/models/obsolete-page.js | 4 ++-- apps/app/src/server/models/page.ts | 8 ++++++++ apps/app/src/server/service/page/index.ts | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/app/src/server/models/obsolete-page.js b/apps/app/src/server/models/obsolete-page.js index 1b3a30f981c..50f3f9fef85 100644 --- a/apps/app/src/server/models/obsolete-page.js +++ b/apps/app/src/server/models/obsolete-page.js @@ -268,11 +268,11 @@ export const getPageSchema = (crowi) => { this.grant = grant || GRANT_PUBLIC; - if (grant === GRANT_OWNER) { + if (Number(grant) === GRANT_OWNER) { this.grantedUsers.push(user?._id ?? user); } - if (grant === GRANT_USER_GROUP) { + if (Number(grant) === GRANT_USER_GROUP) { this.grantedGroups = grantUserGroupIds; } }; diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 881029ddca0..ee43a98948d 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -787,6 +787,14 @@ export async function pushRevision(pageData, newRevision, user) { pageData.lastUpdateUser = user?._id ?? user; pageData.updatedAt = Date.now(); + // Set the _id of grantedGroups to revision._id + if (pageData.grantedGroups.length > 0) { + pageData.grantedGroups = pageData.grantedGroups.map(group => ({ + ...group, + _id: newRevision._id, + })); + } + return pageData.save(); } diff --git a/apps/app/src/server/service/page/index.ts b/apps/app/src/server/service/page/index.ts index 3849d587cee..e361183a1b7 100644 --- a/apps/app/src/server/service/page/index.ts +++ b/apps/app/src/server/service/page/index.ts @@ -4182,7 +4182,7 @@ class PageService implements IPageService { : clonedPageData.grantedGroups; const grantedUserIds = clonedPageData.grantedUserIds || [user._id]; - const shouldBeOnTree = grant !== PageGrant.GRANT_RESTRICTED; + const shouldBeOnTree = Number(grant) !== PageGrant.GRANT_RESTRICTED; const isChildrenExist = await Page.count({ path: new RegExp(`^${escapeStringRegexp(addTrailingSlash(clonedPageData.path))}`), parent: { $ne: null } }); const isGrantChangeable = await this.pageGrantService.validateGrantChange(user, pageData.grantedGroups, grant, grantUserGroupIds); From 18efb32a39dd297da6f58113cd91a41a74b35d1e Mon Sep 17 00:00:00 2001 From: Futa Arai Date: Sat, 31 Aug 2024 06:22:28 +0900 Subject: [PATCH 16/81] fix v4 page update --- apps/app/src/server/models/user-group-relation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/server/models/user-group-relation.ts b/apps/app/src/server/models/user-group-relation.ts index e7f0a894672..9073436c9d8 100644 --- a/apps/app/src/server/models/user-group-relation.ts +++ b/apps/app/src/server/models/user-group-relation.ts @@ -161,7 +161,7 @@ schema.statics.findAllUserGroupIdsRelatedToUser = async function(user): Promise< schema.statics.countByGroupIdsAndUser = async function(userGroupIds: ObjectIdLike[], userData): Promise { const query = { relatedGroup: { $in: userGroupIds }, - relatedUser: userData.id, + relatedUser: userData._id, }; return this.count(query); From 365b15456c46dffef2276241037da415d63d8eb2 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Sep 2024 06:14:29 +0000 Subject: [PATCH 17/81] bugFIx --- .../editor/src/client/components/CodeMirrorEditorReadOnly.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx index 140860d9bc3..4f2182264d9 100644 --- a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx +++ b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx @@ -67,6 +67,7 @@ export const CodeMirrorEditorReadOnly = ({ markdown, onScroll }: Props): JSX.Ele hideToolbar editorKey={GlobalCodeMirrorEditorKey.READONLY} onScroll={onScroll} + cmProps={{}} /> ); }; From 52dcf96d1d020c4d354659851d7a9937bd11f1d8 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Sep 2024 06:15:54 +0000 Subject: [PATCH 18/81] Added extension to hide cursor in readOnlyEditor --- .../editor/src/client/components/CodeMirrorEditorReadOnly.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx index 4f2182264d9..a2b4097c490 100644 --- a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx +++ b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx @@ -13,6 +13,7 @@ const additionalExtensions: Extension[] = [ [ setDataLine, EditorState.readOnly.of(true), + EditorView.editable.of(false), ], ]; From 819d731a452c0db9076c04c7cf85fd92f87395dc Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Sep 2024 06:30:15 +0000 Subject: [PATCH 19/81] Add comment --- .../editor/src/client/components/CodeMirrorEditorReadOnly.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx index a2b4097c490..ff71c5b7250 100644 --- a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx +++ b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx @@ -68,7 +68,7 @@ export const CodeMirrorEditorReadOnly = ({ markdown, onScroll }: Props): JSX.Ele hideToolbar editorKey={GlobalCodeMirrorEditorKey.READONLY} onScroll={onScroll} - cmProps={{}} + cmProps={{}} // Do not pass undefined when initializing useCodeMirrorEditorIsolated /> ); }; From a5b70e7af4f20c052d568cb9c9c7250c20f18ef8 Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Mon, 2 Sep 2024 07:52:38 +0000 Subject: [PATCH 20/81] component delete --- .../PageSelectModal/PageSelectModal.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 16a018604a8..2d21927d3cc 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -26,17 +26,6 @@ import { TreeItemForModal } from './TreeItemForModal'; import 'simplebar-react/dist/simplebar.min.css'; -const TreeForModalWrapper = memo((props: { children: JSX.Element }) => { - - const { children } = props; - return ( -
- - { children } - -
- ); -}); export const PageSelectModal: FC = () => { const { @@ -103,7 +92,7 @@ export const PageSelectModal: FC = () => { {t('page_select_modal.select_page_location')} }> - +
{ onClickTreeItem={onClickTreeItem} />
-
+
From 15d620693c3cf2a9e46d419d8b9257a52e5e3cdb Mon Sep 17 00:00:00 2001 From: kazutoweseek Date: Mon, 2 Sep 2024 08:42:25 +0000 Subject: [PATCH 21/81] memo delete --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 2d21927d3cc..14eb46881ba 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react'; import { Suspense, useState, useCallback, - memo, } from 'react'; import nodePath from 'path'; From 80072af8f56df658f5e91f5a01c8a3dc5a9b1916 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 2 Sep 2024 13:48:20 +0000 Subject: [PATCH 22/81] remove unnecessary file --- .../components/PageSelectModal/PageSelectModal.module.scss | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss b/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss deleted file mode 100644 index 9b0507b0582..00000000000 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.grw-page-select-modal-wrapper { - height: 50vh; -} From d29282360095db638845facb44aaf04575650932 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 2 Sep 2024 13:49:23 +0000 Subject: [PATCH 23/81] improve modal size --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 14eb46881ba..87d1d984b12 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -86,7 +86,6 @@ export const PageSelectModal: FC = () => { isOpen={isOpened} toggle={closeModal} centered - size="lg" > {t('page_select_modal.select_page_location')} From e5810a2d1e43c03e39479febc2317e42b649f9ab Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 2 Sep 2024 13:49:33 +0000 Subject: [PATCH 24/81] improve simple-bar height calculation --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 87d1d984b12..5e6abc6410c 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -90,7 +90,7 @@ export const PageSelectModal: FC = () => { {t('page_select_modal.select_page_location')} }> - + {/* 133px = 63px(ModalHeader) + 70px(ModalFooter) */}
Date: Mon, 2 Sep 2024 13:51:59 +0000 Subject: [PATCH 25/81] remove unnecessary style imports --- .../src/client/components/PageSelectModal/PageSelectModal.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx index 5e6abc6410c..c9fbc1ed780 100644 --- a/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx +++ b/apps/app/src/client/components/PageSelectModal/PageSelectModal.tsx @@ -23,8 +23,6 @@ import { usePagePathRenameHandler } from '../PageEditor/page-path-rename-utils'; import { TreeItemForModal } from './TreeItemForModal'; -import 'simplebar-react/dist/simplebar.min.css'; - export const PageSelectModal: FC = () => { const { From 6e9b361108db261f2063125739fa6fcf51e25fba Mon Sep 17 00:00:00 2001 From: Futa Arai Date: Tue, 3 Sep 2024 02:05:28 +0900 Subject: [PATCH 26/81] remove unnecessary Number cast --- apps/app/src/server/models/obsolete-page.js | 4 ++-- apps/app/src/server/service/page-grant.ts | 2 +- apps/app/src/server/service/page/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/app/src/server/models/obsolete-page.js b/apps/app/src/server/models/obsolete-page.js index 50f3f9fef85..1b3a30f981c 100644 --- a/apps/app/src/server/models/obsolete-page.js +++ b/apps/app/src/server/models/obsolete-page.js @@ -268,11 +268,11 @@ export const getPageSchema = (crowi) => { this.grant = grant || GRANT_PUBLIC; - if (Number(grant) === GRANT_OWNER) { + if (grant === GRANT_OWNER) { this.grantedUsers.push(user?._id ?? user); } - if (Number(grant) === GRANT_USER_GROUP) { + if (grant === GRANT_USER_GROUP) { this.grantedGroups = grantUserGroupIds; } }; diff --git a/apps/app/src/server/service/page-grant.ts b/apps/app/src/server/service/page-grant.ts index 1050d29a150..192ac41c1b1 100644 --- a/apps/app/src/server/service/page-grant.ts +++ b/apps/app/src/server/service/page-grant.ts @@ -276,7 +276,7 @@ class PageGrantService implements IPageGrantService { ).length === 0; if (!userBelongsToAllPreviousGrantedGroups) { - if (Number(grant) !== PageGrant.GRANT_USER_GROUP) { + if (grant !== PageGrant.GRANT_USER_GROUP) { return false; } const pageGrantIncludesUserRelatedGroup = hasIntersection(grantedGroups?.map(g => getIdForRef(g.item)) || [], userRelatedGroupIds); diff --git a/apps/app/src/server/service/page/index.ts b/apps/app/src/server/service/page/index.ts index e361183a1b7..3849d587cee 100644 --- a/apps/app/src/server/service/page/index.ts +++ b/apps/app/src/server/service/page/index.ts @@ -4182,7 +4182,7 @@ class PageService implements IPageService { : clonedPageData.grantedGroups; const grantedUserIds = clonedPageData.grantedUserIds || [user._id]; - const shouldBeOnTree = Number(grant) !== PageGrant.GRANT_RESTRICTED; + const shouldBeOnTree = grant !== PageGrant.GRANT_RESTRICTED; const isChildrenExist = await Page.count({ path: new RegExp(`^${escapeStringRegexp(addTrailingSlash(clonedPageData.path))}`), parent: { $ne: null } }); const isGrantChangeable = await this.pageGrantService.validateGrantChange(user, pageData.grantedGroups, grant, grantUserGroupIds); From c420236880719f64804fd5e9b3a581c39e2a4e7b Mon Sep 17 00:00:00 2001 From: Futa Arai Date: Tue, 3 Sep 2024 02:09:51 +0900 Subject: [PATCH 27/81] remove unnecessary assignment of grantedGroups --- apps/app/src/server/models/page.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index ee43a98948d..881029ddca0 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -787,14 +787,6 @@ export async function pushRevision(pageData, newRevision, user) { pageData.lastUpdateUser = user?._id ?? user; pageData.updatedAt = Date.now(); - // Set the _id of grantedGroups to revision._id - if (pageData.grantedGroups.length > 0) { - pageData.grantedGroups = pageData.grantedGroups.map(group => ({ - ...group, - _id: newRevision._id, - })); - } - return pageData.save(); } From 59bbac27606cd31d31406e21e3a22ee20ccbb323 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Tue, 3 Sep 2024 01:10:41 +0000 Subject: [PATCH 28/81] Allow props to be nullable --- .../editor/src/client/components/CodeMirrorEditorReadOnly.tsx | 1 - packages/editor/src/client/stores/codemirror-editor.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx index ff71c5b7250..96680c489bb 100644 --- a/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx +++ b/packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx @@ -68,7 +68,6 @@ export const CodeMirrorEditorReadOnly = ({ markdown, onScroll }: Props): JSX.Ele hideToolbar editorKey={GlobalCodeMirrorEditorKey.READONLY} onScroll={onScroll} - cmProps={{}} // Do not pass undefined when initializing useCodeMirrorEditorIsolated /> ); }; diff --git a/packages/editor/src/client/stores/codemirror-editor.ts b/packages/editor/src/client/stores/codemirror-editor.ts index e18f3e4c271..571c31bec41 100644 --- a/packages/editor/src/client/stores/codemirror-editor.ts +++ b/packages/editor/src/client/stores/codemirror-editor.ts @@ -33,7 +33,7 @@ export const useCodeMirrorEditorIsolated = ( const newData = useCodeMirrorEditor(mergedProps); - const shouldUpdate = swrKey != null && container != null && props != null && ( + const shouldUpdate = swrKey != null && container != null && ( currentData == null || (isValid(newData) && !isDeepEquals(currentData, newData)) ); From b77f8230094636786005d561e631b19ceb59ef72 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Tue, 3 Sep 2024 06:42:04 +0000 Subject: [PATCH 29/81] fix deps for save method --- apps/app/src/client/components/PageEditor/PageEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/client/components/PageEditor/PageEditor.tsx b/apps/app/src/client/components/PageEditor/PageEditor.tsx index aa71ef5927b..77f272f88a2 100644 --- a/apps/app/src/client/components/PageEditor/PageEditor.tsx +++ b/apps/app/src/client/components/PageEditor/PageEditor.tsx @@ -211,7 +211,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => { finally { mutateWaitingSaveProcessing(false); } - }, [pageId, selectedGrant, mutateWaitingSaveProcessing, t, mutateIsGrantNormalized]); + }, [pageId, selectedGrant, mutateWaitingSaveProcessing, updatePage, mutateIsGrantNormalized, t]); const saveAndReturnToViewHandler = useCallback(async(opts: SaveOptions) => { const markdown = codeMirrorEditor?.getDoc(); From 9fdebb8bd183e3f91505c46e62c51ca69bd06785 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Tue, 3 Sep 2024 09:56:17 +0000 Subject: [PATCH 30/81] imrpv collapseSidebar --- apps/app/playwright/utils/CollapseSidebar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/playwright/utils/CollapseSidebar.ts b/apps/app/playwright/utils/CollapseSidebar.ts index 59abf81284f..752748c0cf1 100644 --- a/apps/app/playwright/utils/CollapseSidebar.ts +++ b/apps/app/playwright/utils/CollapseSidebar.ts @@ -2,8 +2,8 @@ import { expect, type Page } from '@playwright/test'; export const collapseSidebar = async(page: Page, isCollapsed: boolean): Promise => { - const isSidebarContentsHidden = !(await page.getByTestId('grw-sidebar-contents').isVisible()); - if (isSidebarContentsHidden === isCollapsed) { + const isSidebarCollapsed = !(await page.getByTestId('grw-sidebar-contents').isVisible()); + if (isCollapsed === isSidebarCollapsed) { return; } From a2c1ebeb308d95c8981705ad343ea4cf1b4ef121 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Tue, 3 Sep 2024 09:56:36 +0000 Subject: [PATCH 31/81] Add testid --- apps/app/src/client/components/Sidebar/Tag.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/client/components/Sidebar/Tag.tsx b/apps/app/src/client/components/Sidebar/Tag.tsx index bbb1697fd08..e50f4014b1a 100644 --- a/apps/app/src/client/components/Sidebar/Tag.tsx +++ b/apps/app/src/client/components/Sidebar/Tag.tsx @@ -68,7 +68,7 @@ const Tag: FC = () => { ) } -
+
Date: Wed, 4 Sep 2024 06:27:05 +0000 Subject: [PATCH 32/81] Revert "imrpv collapseSidebar" This reverts commit 9fdebb8bd183e3f91505c46e62c51ca69bd06785. --- apps/app/playwright/utils/CollapseSidebar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/playwright/utils/CollapseSidebar.ts b/apps/app/playwright/utils/CollapseSidebar.ts index 752748c0cf1..59abf81284f 100644 --- a/apps/app/playwright/utils/CollapseSidebar.ts +++ b/apps/app/playwright/utils/CollapseSidebar.ts @@ -2,8 +2,8 @@ import { expect, type Page } from '@playwright/test'; export const collapseSidebar = async(page: Page, isCollapsed: boolean): Promise => { - const isSidebarCollapsed = !(await page.getByTestId('grw-sidebar-contents').isVisible()); - if (isCollapsed === isSidebarCollapsed) { + const isSidebarContentsHidden = !(await page.getByTestId('grw-sidebar-contents').isVisible()); + if (isSidebarContentsHidden === isCollapsed) { return; } From 94e317545c696fe3ab1106fe30ce3bf1d4e586a2 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Wed, 4 Sep 2024 06:29:38 +0000 Subject: [PATCH 33/81] use collapseSidebar --- .../access-to-page.spec.ts | 23 ++++++++++--------- apps/app/playwright/utils/CollapseSidebar.ts | 2 -- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/apps/app/playwright/21-basic-features-for-guest/access-to-page.spec.ts b/apps/app/playwright/21-basic-features-for-guest/access-to-page.spec.ts index b4b4bb0239b..b7168e7a7b9 100644 --- a/apps/app/playwright/21-basic-features-for-guest/access-to-page.spec.ts +++ b/apps/app/playwright/21-basic-features-for-guest/access-to-page.spec.ts @@ -32,14 +32,15 @@ test('Access to /trash page', async({ page }) => { await expect(page.getByTestId('trash-page-list')).toBeVisible(); }); -// TODO: Improve collapseSidebar (https://redmine.weseek.co.jp/issues/148538) -// test('Access to /tags page', async({ page }) => { -// await page.goto('/tags'); - -// await collapseSidebar(page, false); -// await page.getByTestId('grw-sidebar-nav-primary-tags').click(); -// await expect(page.getByTestId('grw-sidebar-content-tags')).toBeVisible(); -// await expect(page.getByTestId('grw-tags-list').first()).toBeVisible(); -// await expect(page.getByTestId('grw-tags-list').first()).toContainText('You have no tag, You can set tags on pages'); -// await expect(page.getByTestId('tags-page')).toBeVisible(); -// }); +test('Access to /tags page', async({ page }) => { + await page.goto('/'); + + await collapseSidebar(page, false); + await page.getByTestId('grw-sidebar-nav-primary-tags').click(); + await expect(page.getByTestId('grw-sidebar-content-tags')).toBeVisible(); + await expect(page.getByTestId('grw-tags-list').first()).toBeVisible(); + await expect(page.getByTestId('grw-tags-list').first()).toContainText('You have no tag, You can set tags on pages'); + + await page.getByTestId('check-all-tags-button').click(); + await expect(page.getByTestId('tags-page')).toBeVisible(); +}); diff --git a/apps/app/playwright/utils/CollapseSidebar.ts b/apps/app/playwright/utils/CollapseSidebar.ts index 59abf81284f..61cdc36ba78 100644 --- a/apps/app/playwright/utils/CollapseSidebar.ts +++ b/apps/app/playwright/utils/CollapseSidebar.ts @@ -1,4 +1,3 @@ -// TODO: https://redmine.weseek.co.jp/issues/148538 import { expect, type Page } from '@playwright/test'; export const collapseSidebar = async(page: Page, isCollapsed: boolean): Promise => { @@ -9,7 +8,6 @@ export const collapseSidebar = async(page: Page, isCollapsed: boolean): Promise< const collapseSidebarToggle = page.getByTestId('btn-toggle-collapse'); await expect(collapseSidebarToggle).toBeVisible(); - await collapseSidebarToggle.click(); if (isCollapsed) { From 2cc04fefd1542c0d0892666dfb09a6a02a5f8300 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Wed, 4 Sep 2024 06:54:47 +0000 Subject: [PATCH 34/81] rm cypress test --- .github/workflows/reusable-app-prod.yml | 2 +- ...ic-features-for-guest--access-to-page.cy.ts | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 apps/app/test/cypress/e2e/21-basic-features-for-guest/21-basic-features-for-guest--access-to-page.cy.ts diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml index 39c0f8fa932..583a10e8f57 100644 --- a/.github/workflows/reusable-app-prod.yml +++ b/.github/workflows/reusable-app-prod.yml @@ -213,7 +213,7 @@ jobs: fail-fast: false matrix: # List string expressions that is comma separated ids of tests in "test/cypress/integration" - spec-group: ['21', '50'] + spec-group: ['50'] services: mongodb: diff --git a/apps/app/test/cypress/e2e/21-basic-features-for-guest/21-basic-features-for-guest--access-to-page.cy.ts b/apps/app/test/cypress/e2e/21-basic-features-for-guest/21-basic-features-for-guest--access-to-page.cy.ts deleted file mode 100644 index 336ca00f5e7..00000000000 --- a/apps/app/test/cypress/e2e/21-basic-features-for-guest/21-basic-features-for-guest--access-to-page.cy.ts +++ /dev/null @@ -1,18 +0,0 @@ -context('Access to special pages by guest', () => { - const ssPrefix = 'access-to-special-pages-by-guest-'; - it('/tags is successfully loaded', () => { - cy.visit('/tags'); - - // open sidebar - cy.collapseSidebar(false); - // select tags - cy.getByTestid('grw-sidebar-nav-primary-tags').click(); - cy.getByTestid('grw-sidebar-content-tags').should('be.visible'); - cy.getByTestid('grw-tags-list').should('be.visible'); - cy.getByTestid('grw-tags-list').contains('You have no tag, You can set tags on pages'); - - cy.getByTestid('tags-page').should('be.visible'); - cy.screenshot(`${ssPrefix}-tags`); - }); - -}); From 1b0a86f695ea97a86666d5561e6591c7d86e2fbb Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Wed, 4 Sep 2024 07:52:37 +0000 Subject: [PATCH 35/81] Add Playwright test --- .../50-sidebar/switching-sidebar-mode.spec.ts | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 apps/app/playwright/50-sidebar/switching-sidebar-mode.spec.ts diff --git a/apps/app/playwright/50-sidebar/switching-sidebar-mode.spec.ts b/apps/app/playwright/50-sidebar/switching-sidebar-mode.spec.ts new file mode 100644 index 00000000000..9557b0039ab --- /dev/null +++ b/apps/app/playwright/50-sidebar/switching-sidebar-mode.spec.ts @@ -0,0 +1,43 @@ +import { test } from '@playwright/test'; + +import { collapseSidebar } from '../utils'; + + +test('Switch sidebar mode', async({ page }) => { + await page.goto('/'); + await collapseSidebar(page, false); + await collapseSidebar(page, true); +}); + +// Write tests using VRT +// context('Switch viewport size', () => { +// const ssPrefix = 'switch-viewport-size-'; + +// const sizes = { +// 'xl': [1200, 1024], +// 'lg': [992, 1024], +// 'md': [768, 1024], +// 'sm': [576, 1024], +// 'xs': [575, 1024], +// 'iphone-x': [375, 812], +// }; + +// Object.entries(sizes).forEach(([screenLabel, size]) => { +// it(`on ${screenLabel} screen`, () => { +// cy.viewport(size[0], size[1]); + +// // login +// cy.fixture("user-admin.json").then(user => { +// cy.login(user.username, user.password); +// }); +// cy.visit('/'); + +// cy.get('.layout-root').should('be.visible'); + +// cy.screenshot(`${ssPrefix}-${screenLabel}`, { +// blackout: blackoutOverride, +// }); +// }); +// }); + +// }); From e9e1feddd5dcf7adc61ed8a17034d9944171f2af Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Wed, 4 Sep 2024 07:52:46 +0000 Subject: [PATCH 36/81] rm cypress test --- .../50-sidebar--switching-sidebar-mode.cy.ts | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 apps/app/test/cypress/e2e/50-sidebar/50-sidebar--switching-sidebar-mode.cy.ts diff --git a/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--switching-sidebar-mode.cy.ts b/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--switching-sidebar-mode.cy.ts deleted file mode 100644 index bceaaabe0da..00000000000 --- a/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--switching-sidebar-mode.cy.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { BlackoutGroup } from "../../support/blackout"; - -// Blackout for recalculation of toc content hight -const blackoutOverride = [ - ...BlackoutGroup.BASIS, - ...BlackoutGroup.SIDE_CONTENTS, -]; - -context('Switch sidebar mode', () => { - const ssPrefix = 'switch-sidebar-mode-'; - - beforeEach(() => { - // login - cy.fixture("user-admin.json").then(user => { - cy.login(user.username, user.password); - }); - cy.visit('/'); - }); - - it('Switching sidebar mode', () => { - cy.collapseSidebar(false); - cy.screenshot(`${ssPrefix}-doc-mode-opened`, { - blackout: blackoutOverride, - }); - - cy.collapseSidebar(true); - cy.screenshot(`${ssPrefix}-doc-mode-closed`, { - blackout: blackoutOverride, - }); - }); - -}); - -context('Switch viewport size', () => { - const ssPrefix = 'switch-viewport-size-'; - - const sizes = { - 'xl': [1200, 1024], - 'lg': [992, 1024], - 'md': [768, 1024], - 'sm': [576, 1024], - 'xs': [575, 1024], - 'iphone-x': [375, 812], - }; - - Object.entries(sizes).forEach(([screenLabel, size]) => { - it(`on ${screenLabel} screen`, () => { - cy.viewport(size[0], size[1]); - - // login - cy.fixture("user-admin.json").then(user => { - cy.login(user.username, user.password); - }); - cy.visit('/'); - - cy.get('.layout-root').should('be.visible'); - - cy.screenshot(`${ssPrefix}-${screenLabel}`, { - blackout: blackoutOverride, - }); - }); - }); - -}); - From cb0ce4b50cb5d03a8e28b88ab53236c7a3387586 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Wed, 4 Sep 2024 09:23:58 +0000 Subject: [PATCH 37/81] Add playwright test --- .../50-sidebar/access-to-sidebar.spec.ts | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts diff --git a/apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts b/apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts new file mode 100644 index 00000000000..58dc3e7a704 --- /dev/null +++ b/apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts @@ -0,0 +1,170 @@ +import { test, expect } from '@playwright/test'; + +import { collapseSidebar } from '../utils'; + + +test.describe('Access to sidebar', () => { + + test.beforeEach(async({ page }) => { + await page.goto('/'); + await collapseSidebar(page, false); + }); + + test('Successfully show sidebar', async({ page }) => { + await expect(page.getByTestId('grw-sidebar-contents')).toBeVisible(); + }); + + test('Successfully access to page tree', async({ page }) => { + await page.getByTestId('grw-sidebar-nav-primary-page-tree').click(); + await expect(page.getByTestId('grw-sidebar-contents')).toBeVisible(); + await expect(page.getByTestId('grw-pagetree-item-container').first()).toBeVisible(); + }); + + test('Successfully access to recent changes', async({ page }) => { + await page.getByTestId('grw-sidebar-nav-primary-recent-changes').click(); + await expect(page.getByTestId('grw-recent-changes')).toBeVisible(); + await expect(page.locator('.list-group-item').first()).toBeVisible(); + }); + + test('Successfully access to custom sidebar', async({ page }) => { + await page.getByTestId('grw-sidebar-nav-primary-custom-sidebar').click(); + await expect(page.getByTestId('grw-sidebar-contents')).toBeVisible(); + await expect(page.locator('.grw-sidebar-content-header > h3').locator('a')).toBeVisible(); + }); + + test('Successfully access to GROWI Docs page', async({ page }) => { + const linkElement = page.locator('.grw-sidebar-nav-secondary-container a[href*="https://docs.growi.org"]'); + const docsUrl = await linkElement.getAttribute('href'); + if (docsUrl == null) { + throw new Error('url is null'); + } + const response = await page.request.get(docsUrl); + const body = await response.text(); + expect(body).toContain(''); + }); + + test('Successfully access to trash page', async({ page }) => { + await page.locator('.grw-sidebar-nav-secondary-container a[href*="/trash"]').click(); + await expect(page.getByTestId('trash-page-list')).toBeVisible(); + }); + + + // + // Deactivate: An error occurs that cannot be reproduced in the development environment. -- Yuki Takei 2024.05.10 + // + + // it('Successfully click Add to Bookmarks button', () => { + // cy.waitUntil(() => { + // // do + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element + // cy.get('li').realHover(); + // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); + // }); + // }); + // // wait until + // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); + // }); + + // cy.get('.dropdown-menu.show').should('be.visible').within(() => { + // // take a screenshot for dropdown menu + // cy.screenshot(`${ssPrefix}page-tree-2-before-adding-bookmark`) + // // click add remove bookmark btn + // cy.getByTestid('add-bookmark-btn').click(); + // }) + + // // show dropdown again + // cy.waitUntil(() => { + // // do + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element + // cy.get('li').realHover(); + // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); + // }); + // }); + // // wait until + // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); + // }); + + // cy.get('.dropdown-menu.show').should('be.visible').within(() => { + // // expect to be visible + // cy.getByTestid('remove-bookmark-btn').should('be.visible'); + // // take a screenshot for dropdown menu + // cy.screenshot(`${ssPrefix}page-tree-2-after-adding-bookmark`); + // }); + // }); + + // it('Successfully show duplicate page modal', () => { + // cy.waitUntil(() => { + // // do + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element + // cy.get('li').realHover(); + // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); + // }); + // }); + // // wait until + // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); + // }); + + // cy.get('.dropdown-menu.show').should('be.visible').within(() => { + // cy.getByTestid('open-page-duplicate-modal-btn').click(); + // }) + + // cy.getByTestid('page-duplicate-modal').should('be.visible').within(() => { + // cy.get('.form-control').type('_test'); + + // cy.screenshot(`${ssPrefix}page-tree-5-duplicate-page-modal`, { blackout: blackoutOverride }); + + // cy.get('.modal-header > button').click(); + // }); + // }); + + // it('Successfully rename page', () => { + // cy.waitUntil(() => { + // // do + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element + // cy.get('li').realHover(); + // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); + // }); + // }); + // // wait until + // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); + // }); + + // cy.get('.dropdown-menu.show').should('be.visible').within(() => { + // cy.getByTestid('rename-page-btn').click(); + // }) + + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('autosize-submittable-input').type('_newname'); + // }) + + // cy.screenshot(`${ssPrefix}page-tree-6-rename-page`, { blackout: blackoutOverride }); + // }); + + // it('Successfully show delete page modal', () => { + // cy.waitUntil(() => { + // // do + // cy.getByTestid('grw-sidebar-contents').within(() => { + // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element + // cy.get('li').realHover(); + // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); + // }); + // }); + // // wait until + // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); + // }); + + // cy.get('.dropdown-menu.show').should('be.visible').within(() => { + // cy.getByTestid('open-page-delete-modal-btn').click(); + // }) + + // cy.getByTestid('page-delete-modal').should('be.visible').within(() => { + // cy.screenshot(`${ssPrefix}page-tree-7-delete-page-modal`, { blackout: blackoutOverride }); + // cy.get('.modal-header > button').click(); + // }); + // }); + +}); From e6f1cba2a1bcbb424684ed7a441b672d6e070b61 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Thu, 5 Sep 2024 01:38:28 +0000 Subject: [PATCH 38/81] rm cypress test --- .github/workflows/reusable-app-prod.yml | 2 +- .../50-sidebar--access-to-side-bar.cy.ts | 303 ------------------ 2 files changed, 1 insertion(+), 304 deletions(-) delete mode 100644 apps/app/test/cypress/e2e/50-sidebar/50-sidebar--access-to-side-bar.cy.ts diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml index 583a10e8f57..4911c893ca6 100644 --- a/.github/workflows/reusable-app-prod.yml +++ b/.github/workflows/reusable-app-prod.yml @@ -213,7 +213,7 @@ jobs: fail-fast: false matrix: # List string expressions that is comma separated ids of tests in "test/cypress/integration" - spec-group: ['50'] + spec-group: [] services: mongodb: diff --git a/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--access-to-side-bar.cy.ts b/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--access-to-side-bar.cy.ts deleted file mode 100644 index 9e79701f43f..00000000000 --- a/apps/app/test/cypress/e2e/50-sidebar/50-sidebar--access-to-side-bar.cy.ts +++ /dev/null @@ -1,303 +0,0 @@ -import { BlackoutGroup } from "../../support/blackout"; - -// Blackout for recalculation of toc content hight -const blackoutOverride = [ - ...BlackoutGroup.BASIS, - ...BlackoutGroup.SIDE_CONTENTS, -]; - -describe('Access to sidebar', () => { - const ssPrefix = 'access-to-sidebar-'; - - context('when logged in', () => { - beforeEach(() => { - // login - cy.fixture("user-admin.json").then(user => { - cy.login(user.username, user.password); - }); - }); - - context('when access to root page', { scrollBehavior: false }, () => { - beforeEach(() => { - cy.visit('/'); - - // Since this is a sidebar test, call collapseSidebar in beforeEach. - cy.collapseSidebar(false, true); - }); - - describe('Test show/collapse button', () => { - it('Successfully show sidebar', () => { - cy.getByTestid('grw-sidebar-contents').should('be.visible'); - - cy.waitUntilSkeletonDisappear(); - cy.screenshot(`${ssPrefix}1-sidebar-shown`, { - capture: 'viewport', - blackout: blackoutOverride, - }); - }); - - it('Successfully collapse sidebar', () => { - cy.getByTestid('btn-toggle-collapse').click({force: true}); - - cy.getByTestid('grw-sidebar-contents').should('not.be.visible'); - - cy.waitUntilSkeletonDisappear(); - cy.screenshot(`${ssPrefix}2-sidebar-collapsed`, { - capture: 'viewport', - blackout: blackoutOverride, - }); - }); - }); - - describe('Test page tree tab', () => { - beforeEach(() => { - cy.getByTestid('grw-sidebar-nav-primary-page-tree').click(); - }); - - it('Successfully access to page tree', () => { - cy.getByTestid('grw-sidebar-contents').within(() => { - cy.getByTestid('grw-pagetree-item-container').should('be.visible'); - - cy.waitUntilSkeletonDisappear(); - cy.screenshot(`${ssPrefix}page-tree-1-access-to-page-tree`, { blackout: blackoutOverride }); - }); - }); - - - // - // Deactivate: An error occurs that cannot be reproduced in the development environment. -- Yuki Takei 2024.05.10 - // - - // it('Successfully click Add to Bookmarks button', () => { - // cy.waitUntil(() => { - // // do - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element - // cy.get('li').realHover(); - // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); - // }); - // }); - // // wait until - // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); - // }); - - // cy.get('.dropdown-menu.show').should('be.visible').within(() => { - // // take a screenshot for dropdown menu - // cy.screenshot(`${ssPrefix}page-tree-2-before-adding-bookmark`) - // // click add remove bookmark btn - // cy.getByTestid('add-bookmark-btn').click(); - // }) - - // // show dropdown again - // cy.waitUntil(() => { - // // do - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element - // cy.get('li').realHover(); - // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); - // }); - // }); - // // wait until - // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); - // }); - - // cy.get('.dropdown-menu.show').should('be.visible').within(() => { - // // expect to be visible - // cy.getByTestid('remove-bookmark-btn').should('be.visible'); - // // take a screenshot for dropdown menu - // cy.screenshot(`${ssPrefix}page-tree-2-after-adding-bookmark`); - // }); - // }); - - // it('Successfully show duplicate page modal', () => { - // cy.waitUntil(() => { - // // do - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element - // cy.get('li').realHover(); - // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); - // }); - // }); - // // wait until - // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); - // }); - - // cy.get('.dropdown-menu.show').should('be.visible').within(() => { - // cy.getByTestid('open-page-duplicate-modal-btn').click(); - // }) - - // cy.getByTestid('page-duplicate-modal').should('be.visible').within(() => { - // cy.get('.form-control').type('_test'); - - // cy.screenshot(`${ssPrefix}page-tree-5-duplicate-page-modal`, { blackout: blackoutOverride }); - - // cy.get('.modal-header > button').click(); - // }); - // }); - - // it('Successfully rename page', () => { - // cy.waitUntil(() => { - // // do - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element - // cy.get('li').realHover(); - // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); - // }); - // }); - // // wait until - // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); - // }); - - // cy.get('.dropdown-menu.show').should('be.visible').within(() => { - // cy.getByTestid('rename-page-btn').click(); - // }) - - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('autosize-submittable-input').type('_newname'); - // }) - - // cy.screenshot(`${ssPrefix}page-tree-6-rename-page`, { blackout: blackoutOverride }); - // }); - - // it('Successfully show delete page modal', () => { - // cy.waitUntil(() => { - // // do - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-pagetree-item-container').eq(1).within(() => { // against the second element - // cy.get('li').realHover(); - // cy.getByTestid('open-page-item-control-btn').find('button').first().realClick(); - // }); - // }); - // // wait until - // return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible')); - // }); - - // cy.get('.dropdown-menu.show').should('be.visible').within(() => { - // cy.getByTestid('open-page-delete-modal-btn').click(); - // }) - - // cy.getByTestid('page-delete-modal').should('be.visible').within(() => { - // cy.screenshot(`${ssPrefix}page-tree-7-delete-page-modal`, { blackout: blackoutOverride }); - // cy.get('.modal-header > button').click(); - // }); - // }); - }); - - describe('Test custom sidebar tab', () => { - beforeEach(() => { - cy.getByTestid('grw-sidebar-nav-primary-custom-sidebar').click(); - }); - - it('Successfully access to custom sidebar', () => { - cy.getByTestid('grw-sidebar-contents').within(() => { - cy.get('.grw-sidebar-content-header > h4').find('a'); - - cy.waitUntilSkeletonDisappear(); - cy.screenshot(`${ssPrefix}custom-sidebar-1-access-to-custom-sidebar`, { blackout: blackoutOverride }); - }); - }); - - // TODO: fix by https://redmine.weseek.co.jp/issues/138562 - // it('Successfully redirect to editor', () => { - // const content = '# HELLO \n ## Hello\n ### Hello'; - - // cy.get('.grw-sidebar-content-header > h3 > a').should('be.visible').click(); - - // cy.get('.layout-root').should('have.class', 'editing'); - // cy.get('.CodeMirror textarea').type(content, {force: true}); - - // cy.screenshot(`${ssPrefix}custom-sidebar-2-redirect-to-editor`, { blackout: blackoutOverride }); - - // cy.getByTestid('save-page-btn').click(); - // }); - - // it('Successfully create custom sidebar content', () => { - // cy.getByTestid('grw-sidebar-nav-primary-custom-sidebar') - // .should('be.visible') - // .should('have.class', 'active'); - - // cy.waitUntilSkeletonDisappear(); - // cy.screenshot(`${ssPrefix}custom-sidebar-3-content-created`, { blackout: blackoutOverride }); - // }); - }); - - describe('Test recent changes tab', () => { - beforeEach(() => { - cy.getByTestid('grw-sidebar-nav-primary-recent-changes').click(); - }); - - it('Successfully access to recent changes', () => { - cy.getByTestid('grw-recent-changes').should('be.visible'); - cy.get('.list-group-item').should('be.visible'); - - // The scope of the screenshot is not narrowed because the blackout is shifted - cy.screenshot(`${ssPrefix}recent-changes-access-to-recent-changes`, { blackout: blackoutOverride }); - }); - - }); - - // - // Deactivate: An error occurs that cannot be reproduced in the development environment. -- Yuki Takei 2024.05.10 - // - // describe('Test tags tab', () => { - // beforeEach(() => { - // cy.getByTestid('grw-sidebar-nav-primary-tags').click(); - // }); - - // it('Successfully access to tags', () => { - // cy.getByTestid('grw-sidebar-contents').within(() => { - // cy.getByTestid('grw-tags-list').should('be.visible'); - - // cy.screenshot(`${ssPrefix}tags-1-access-to-tags`, { blackout: blackoutOverride }); - // }); - // }); - - // it('Succesfully click all tags button', () => { - // cy.getByTestid('grw-sidebar-content-tags').within(() => { - // cy.get('.btn-primary').as('check-all-tags-button'); - // cy.get('@check-all-tags-button').should('be.visible'); - // cy.get('@check-all-tags-button').click({force: true}); - // }); - // cy.collapseSidebar(true); - // cy.getByTestid('grw-tags-list').should('be.visible'); - - // cy.screenshot(`${ssPrefix}tags-2-click-all-tags-button`, { blackout: blackoutOverride }); - // }); - // }); - - // // TODO: No Drafts pages on GROWI version 6 - // it('Successfully access to My Drafts page', () => { - // cy.visit('/'); - // cy.collapseSidebar(true); - // cy.get('.grw-sidebar-nav-secondary-container').within(() => { - // cy.get('a[href*="/me/drafts"]').click(); - // }); - // cy.screenshot(`${ssPrefix}access-to-drafts-page`, { blackout: blackoutOverride }); - // }); - - describe('Test access to GROWI Docs page', () => { - it('Successfully access to GROWI Docs page', () => { - cy.get('.grw-sidebar-nav-secondary-container').within(() => { - cy.get('a[href*="https://docs.growi.org"]').then(($a) => { - const url = $a.prop('href') - cy.request(url).its('body').should('include', ''); - }); - }); - }); - }); - - describe('Test access to trash page', () => { - it('Successfully access to trash page', () => { - cy.collapseSidebar(true); - cy.get('.grw-sidebar-nav-secondary-container').within(() => { - cy.get('a[href*="/trash"]').click(); - }); - - cy.getByTestid('trash-page-list').should('be.visible'); - - cy.screenshot(`${ssPrefix}access-to-trash-page`, { blackout: blackoutOverride }); - }); - }); - }); - }); -}); From 038f2363d0537d09782340f66923b532fcb2b7d2 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Thu, 5 Sep 2024 03:59:44 +0000 Subject: [PATCH 39/81] Omit Cypress --- .github/workflows/ci-app-prod.yml | 34 +- .github/workflows/reusable-app-prod.yml | 145 ------ apps/app/.gitignore | 2 - apps/app/cypress.config.ts | 30 -- apps/app/package.json | 3 - apps/app/test/cypress/.eslintrc.js | 8 - .../e2e/0-advanced-examples/misc.cy.ts | 102 ---- .../e2e/0-advanced-examples/viewport.cy.ts | 59 --- .../app/test/cypress/fixtures/user-admin.json | 6 - apps/app/test/cypress/support/assertions.ts | 21 - apps/app/test/cypress/support/blackout.ts | 14 - apps/app/test/cypress/support/commands.ts | 118 ----- apps/app/test/cypress/support/index.ts | 48 -- apps/app/test/cypress/support/screenshot.ts | 9 - apps/app/test/cypress/tsconfig.json | 16 - .../generate-cypress-spec-arg.mjs | 53 -- package.json | 2 - yarn.lock | 466 +----------------- 18 files changed, 31 insertions(+), 1105 deletions(-) delete mode 100644 apps/app/cypress.config.ts delete mode 100644 apps/app/test/cypress/.eslintrc.js delete mode 100644 apps/app/test/cypress/e2e/0-advanced-examples/misc.cy.ts delete mode 100644 apps/app/test/cypress/e2e/0-advanced-examples/viewport.cy.ts delete mode 100644 apps/app/test/cypress/fixtures/user-admin.json delete mode 100644 apps/app/test/cypress/support/assertions.ts delete mode 100644 apps/app/test/cypress/support/blackout.ts delete mode 100644 apps/app/test/cypress/support/commands.ts delete mode 100644 apps/app/test/cypress/support/index.ts delete mode 100644 apps/app/test/cypress/support/screenshot.ts delete mode 100644 apps/app/test/cypress/tsconfig.json delete mode 100644 bin/github-actions/generate-cypress-spec-arg.mjs diff --git a/.github/workflows/ci-app-prod.yml b/.github/workflows/ci-app-prod.yml index a91bda667be..7a5f3b39052 100644 --- a/.github/workflows/ci-app-prod.yml +++ b/.github/workflows/ci-app-prod.yml @@ -34,12 +34,6 @@ on: - apps/app/** - '!apps/app/docker/**' - packages/** - workflow_call: - inputs: - cypress-config-video: - description: 'Enable video when running Cypress test' - type: boolean - default: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -62,25 +56,21 @@ jobs: with: node-version: 20.x skip-e2e-test: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }} - cypress-report-artifact-name-prefix: cypress-report- - cypress-config-video: ${{ inputs.cypress-config-video || false }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + # run-reg-suit-node20: + # needs: [test-prod-node20] - run-reg-suit-node20: - needs: [test-prod-node20] + # uses: weseek/growi/.github/workflows/reusable-app-reg-suit.yml@master - uses: weseek/growi/.github/workflows/reusable-app-reg-suit.yml@master + # if: always() - if: always() - - with: - node-version: 20.x - skip-reg-suit: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }} - cypress-report-artifact-name-pattern: cypress-report-* - secrets: - REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: ${{ secrets.REG_NOTIFY_GITHUB_PLUGIN_CLIENTID }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + # with: + # node-version: 20.x + # skip-reg-suit: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }} + # secrets: + # REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: ${{ secrets.REG_NOTIFY_GITHUB_PLUGIN_CLIENTID }} + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml index 4911c893ca6..a51a822525b 100644 --- a/.github/workflows/reusable-app-prod.yml +++ b/.github/workflows/reusable-app-prod.yml @@ -8,11 +8,6 @@ on: type: string skip-e2e-test: type: boolean - cypress-report-artifact-name-prefix: - type: string - cypress-config-video: - type: boolean - default: false secrets: SLACK_WEBHOOK_URL: required: true @@ -201,146 +196,6 @@ jobs: url: ${{ secrets.SLACK_WEBHOOK_URL }} - - run-cypress: - needs: [build-prod] - - if: ${{ !inputs.skip-e2e-test }} - - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # List string expressions that is comma separated ids of tests in "test/cypress/integration" - spec-group: [] - - services: - mongodb: - image: mongo:6.0 - ports: - - 27017/tcp - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1 - ports: - - 9200/tcp - env: - discovery.type: single-node - - steps: - - uses: actions/checkout@v4 - - - name: Install fonts - run: sudo apt install fonts-noto - - - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - cache: 'yarn' - cache-dependency-path: '**/yarn.lock' - - - name: Install turbo - run: | - yarn global add turbo - - - name: Prune repositories - run: | - turbo prune @growi/app - rm -rf apps packages - mv out/* . - - - name: Restore node_modules - uses: actions/cache/restore@v4 - with: - path: | - **/node_modules - # saved key by build-prod - key: node_modules-app-build-prod-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - node_modules-app-build-prod-${{ runner.OS }}-node${{ inputs.node-version }}- - - - name: Cache/Restore Cypress files - uses: actions/cache@v4 - with: - path: | - ~/.cache/Cypress - key: deps-for-cypress-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - deps-for-cypress-${{ runner.OS }}-node${{ inputs.node-version }}- - - - name: Install dependencies - run: | - yarn global add node-gyp - yarn --frozen-lockfile - yarn cypress install - - - name: Download production files artifact - uses: actions/download-artifact@v4 - with: - name: Production Files (node${{ inputs.node-version }}) - - - name: Extract procution files artifact - run: | - tar -xf ${{ needs.build-prod.outputs.PROD_FILES }} - - - name: Determine spec expression - id: determine-spec-exp - run: | - SPEC=`node bin/github-actions/generate-cypress-spec-arg.mjs --prefix="test/cypress/e2e/" --suffix="-*/*.cy.{ts,tsx}" "${{ matrix.spec-group }}"` - echo "value=$SPEC" >> $GITHUB_OUTPUT - - - name: Copy dotenv file for ci - working-directory: ./apps/app - run: | - cat config/ci/.env.local.for-ci >> .env.production.local - - - name: Copy dotenv file for automatic installation - if: ${{ matrix.spec-group != '10' }} - working-directory: ./apps/app - run: | - cat config/ci/.env.local.for-auto-install >> .env.production.local - - - name: Copy dotenv file for automatic installation with allowing guest mode - if: ${{ matrix.spec-group == '21' }} - working-directory: ./apps/app - run: | - cat config/ci/.env.local.for-auto-install-with-allowing-guest >> .env.production.local - - - name: Cypress Run - uses: cypress-io/github-action@v6 - with: - browser: chromium - working-directory: ./apps/app - spec: '${{ steps.determine-spec-exp.outputs.value }}' - install: false - start: yarn server - wait-on: 'http://localhost:3000' - config: video=${{ inputs.cypress-config-video }} - env: - MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi-vrt - ELASTICSEARCH_URI: http://localhost:${{ job.services.elasticsearch.ports['9200'] }}/growi - - - name: Upload results - if: always() - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.cypress-report-artifact-name-prefix }}${{ matrix.spec-group }} - path: | - apps/app/test/cypress/screenshots - apps/app/test/cypress/videos - - - name: Slack Notification - uses: weseek/ghaction-slack-notification@master - if: failure() - with: - type: ${{ job.status }} - job_name: '*Node CI for growi - run-cypress (${{ inputs.node-version }})*' - channel: '#ci' - isCompactMode: true - url: ${{ secrets.SLACK_WEBHOOK_URL }} - - - run-playwright: needs: [build-prod] diff --git a/apps/app/.gitignore b/apps/app/.gitignore index 5d827698f30..91e0807b3e5 100644 --- a/apps/app/.gitignore +++ b/apps/app/.gitignore @@ -3,8 +3,6 @@ /out/ # test -test/cypress/screenshots -test/cypress/videos .reg # dist diff --git a/apps/app/cypress.config.ts b/apps/app/cypress.config.ts deleted file mode 100644 index 433f6bba001..00000000000 --- a/apps/app/cypress.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { defineConfig } from 'cypress'; - -export default defineConfig({ - e2e: { - baseUrl: 'http://localhost:3000', - specPattern: 'test/cypress/e2e/**/*.cy.{ts,tsx}', - supportFile: 'test/cypress/support/index.ts', - setupNodeEvents: (on) => { - // change screen size - // see: https://docs.cypress.io/api/plugins/browser-launch-api#Set-screen-size-when-running-headless - on('before:browser:launch', (browser, launchOptions) => { - if (browser.name === 'chromium' && browser.isHeadless) { - launchOptions.args.push('--window-size=1400,1024'); - launchOptions.args.push('--force-device-scale-factor=1'); - } - return launchOptions; - }); - }, - defaultCommandTimeout: 7000, - }, - fileServerFolder: 'test/cypress', - fixturesFolder: 'test/cypress/fixtures', - screenshotsFolder: 'test/cypress/screenshots', - videosFolder: 'test/cypress/videos', - video: false, - - viewportWidth: 1400, - viewportHeight: 1024, - -}); diff --git a/apps/app/package.json b/apps/app/package.json index 0377efc8eea..e2fb7409bfe 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -25,7 +25,6 @@ "dev:migrate:status": "yarn dev:migrate-mongo status -f config/migrate-mongo-config.js", "dev:migrate:up": "yarn dev:migrate-mongo up -f config/migrate-mongo-config.js", "dev:migrate:down": "yarn dev:migrate-mongo down -f config/migrate-mongo-config.js", - "cy:run": "cypress run --browser chromium", "//// for CI": "", "dev:ci": "yarn cross-env NODE_ENV=development yarn ts-node src/server/app.ts --ci", "lint:typecheck": "npx -y tspc", @@ -243,11 +242,9 @@ "babel-loader": "^8.2.5", "bootstrap": "=5.3.2", "connect-browser-sync": "^2.1.0", - "cypress-real-events": "^1.12.0", "diff2html": "^3.4.47", "downshift": "^8.2.3", "eazy-logger": "^3.1.0", - "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-jest": "^26.5.3", "eslint-plugin-regex": "^1.8.0", "fslightbox-react": "^1.7.6", diff --git a/apps/app/test/cypress/.eslintrc.js b/apps/app/test/cypress/.eslintrc.js deleted file mode 100644 index df8791883b8..00000000000 --- a/apps/app/test/cypress/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: [ - 'weseek/typescript', - 'plugin:cypress/recommended', - ], - plugins: ['@typescript-eslint', 'cypress'], -}; diff --git a/apps/app/test/cypress/e2e/0-advanced-examples/misc.cy.ts b/apps/app/test/cypress/e2e/0-advanced-examples/misc.cy.ts deleted file mode 100644 index bea3f1c102d..00000000000 --- a/apps/app/test/cypress/e2e/0-advanced-examples/misc.cy.ts +++ /dev/null @@ -1,102 +0,0 @@ -context('Misc', () => { - beforeEach(() => { - cy.visit('https://example.cypress.io/commands/misc') - }) - - it('.end() - end the command chain', () => { - // https://on.cypress.io/end - - // cy.end is useful when you want to end a chain of commands - // and force Cypress to re-query from the root element - cy.get('.misc-table').within(() => { - // ends the current chain and yields null - cy.contains('Cheryl').click().end() - - // queries the entire table again - cy.contains('Charles').click() - }) - }) - - it('cy.exec() - execute a system command', () => { - // execute a system command. - // so you can take actions necessary for - // your test outside the scope of Cypress. - // https://on.cypress.io/exec - - // we can use Cypress.platform string to - // select appropriate command - // https://on.cypress/io/platform - cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`) - - // on CircleCI Windows build machines we have a failure to run bash shell - // https://github.com/cypress-io/cypress/issues/5169 - // so skip some of the tests by passing flag "--env circle=true" - const isCircleOnWindows = Cypress.platform === 'win32' && Cypress.env('circle') - - if (isCircleOnWindows) { - cy.log('Skipping test on CircleCI') - - return - } - - // cy.exec problem on Shippable CI - // https://github.com/cypress-io/cypress/issues/6718 - const isShippable = Cypress.platform === 'linux' && Cypress.env('shippable') - - if (isShippable) { - cy.log('Skipping test on ShippableCI') - - return - } - - cy.exec('echo Jane Lane') - .its('stdout').should('contain', 'Jane Lane') - - if (Cypress.platform === 'win32') { - cy.exec('print cypress.json') - .its('stderr').should('be.empty') - } else { - cy.exec('cat cypress.json') - .its('stderr').should('be.empty') - - cy.exec('pwd') - .its('code').should('eq', 0) - } - }) - - it('cy.focused() - get the DOM element that has focus', () => { - // https://on.cypress.io/focused - cy.get('.misc-form').find('#name').click() - cy.focused().should('have.id', 'name') - - cy.get('.misc-form').find('#description').click() - cy.focused().should('have.id', 'description') - }) - - context('Cypress.Screenshot', function () { - it('cy.screenshot() - take a screenshot', () => { - // https://on.cypress.io/screenshot - cy.screenshot('my-image') - }) - - it('Cypress.Screenshot.defaults() - change default config of screenshots', function () { - Cypress.Screenshot.defaults({ - blackout: ['.foo'], - capture: 'viewport', - clip: { x: 0, y: 0, width: 200, height: 200 }, - scale: false, - disableTimersAndAnimations: true, - screenshotOnRunFailure: true, - onBeforeScreenshot () { }, - onAfterScreenshot () { }, - }) - }) - }) - - it('cy.wrap() - wrap an object', () => { - // https://on.cypress.io/wrap - cy.wrap({ foo: 'bar' }) - .should('have.property', 'foo') - .and('include', 'bar') - }) -}) diff --git a/apps/app/test/cypress/e2e/0-advanced-examples/viewport.cy.ts b/apps/app/test/cypress/e2e/0-advanced-examples/viewport.cy.ts deleted file mode 100644 index d37ac8e5d95..00000000000 --- a/apps/app/test/cypress/e2e/0-advanced-examples/viewport.cy.ts +++ /dev/null @@ -1,59 +0,0 @@ -context('Viewport', () => { - beforeEach(() => { - cy.visit('https://example.cypress.io/commands/viewport') - }) - - it('cy.viewport() - set the viewport size and dimension', () => { - // https://on.cypress.io/viewport - - cy.get('#navbar').should('be.visible') - cy.viewport(320, 480) - - // the navbar should have collapse since our screen is smaller - cy.get('#navbar').should('not.be.visible') - cy.get('.navbar-toggle').should('be.visible').click() - cy.get('.nav').find('a').should('be.visible') - - // lets see what our app looks like on a super large screen - cy.viewport(2999, 2999) - - // cy.viewport() accepts a set of preset sizes - // to easily set the screen to a device's width and height - - // We added a cy.wait() between each viewport change so you can see - // the change otherwise it is a little too fast to see :) - - /* eslint-disable cypress/no-unnecessary-waiting */ - cy.viewport('macbook-15') - cy.wait(200) - cy.viewport('macbook-13') - cy.wait(200) - cy.viewport('macbook-11') - cy.wait(200) - cy.viewport('ipad-2') - cy.wait(200) - cy.viewport('ipad-mini') - cy.wait(200) - cy.viewport('iphone-6+') - cy.wait(200) - cy.viewport('iphone-6') - cy.wait(200) - cy.viewport('iphone-5') - cy.wait(200) - cy.viewport('iphone-4') - cy.wait(200) - cy.viewport('iphone-3') - cy.wait(200) - - // cy.viewport() accepts an orientation for all presets - // the default orientation is 'portrait' - cy.viewport('ipad-2', 'portrait') - cy.wait(200) - cy.viewport('iphone-4', 'landscape') - cy.wait(200) - /* eslint-enable cypress/no-unnecessary-waiting */ - - // The viewport will be reset back to the default dimensions - // in between tests (the default can be set in cypress.json) - }) -}) diff --git a/apps/app/test/cypress/fixtures/user-admin.json b/apps/app/test/cypress/fixtures/user-admin.json deleted file mode 100644 index a79bd9eed4e..00000000000 --- a/apps/app/test/cypress/fixtures/user-admin.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "username": "admin", - "name": "Admin", - "email": "admin@example.com", - "password": "adminadmin" -} diff --git a/apps/app/test/cypress/support/assertions.ts b/apps/app/test/cypress/support/assertions.ts deleted file mode 100644 index f5cec371e3d..00000000000 --- a/apps/app/test/cypress/support/assertions.ts +++ /dev/null @@ -1,21 +0,0 @@ -// from https://github.com/cypress-io/cypress/issues/877#issuecomment-538708750 -const isInViewport = (_chai) => { - function assertIsInViewport() { - - const subject = this._obj; - - const bottom = Cypress.config("viewportWidth"); - const rect = subject[0].getBoundingClientRect(); - - this.assert( - rect.top < bottom && rect.bottom < bottom, - "expected #{this} to be in viewport", - "expected #{this} to not be in viewport", - this._obj - ) - } - - _chai.Assertion.addMethod('inViewport', assertIsInViewport) -}; - -chai.use(isInViewport); diff --git a/apps/app/test/cypress/support/blackout.ts b/apps/app/test/cypress/support/blackout.ts deleted file mode 100644 index 0dadc2abc71..00000000000 --- a/apps/app/test/cypress/support/blackout.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const BlackoutGroup = { - BASIS: [ - '[data-vrt-blackout=true]', - '[data-vrt-blackout-hash=true]', - '[data-vrt-blackout-profile=true]', - '[data-vrt-blackout-datetime=true]', - ], - SIDEBAR_NAV: [ - '[data-vrt-blackout-sidebar-nav=true]', - ], - SIDE_CONTENTS: [ - '[data-vrt-blackout-side-contents=true]', - ], -} as const; diff --git a/apps/app/test/cypress/support/commands.ts b/apps/app/test/cypress/support/commands.ts deleted file mode 100644 index 23fe74296f9..00000000000 --- a/apps/app/test/cypress/support/commands.ts +++ /dev/null @@ -1,118 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) - -import 'cypress-wait-until'; - -function isVisible($elem: JQuery) { - return $elem.is(':visible'); -} -function isHidden($elem: JQuery) { - return !isVisible($elem); -} -function isVisibleByTestId(testId: string) { - return isVisible(Cypress.$(`[data-testid=${testId}]`)); -} -function isHiddenByTestId(testId: string) { - return !isVisibleByTestId(testId); -} - -Cypress.Commands.add('getByTestid', (selector, options?) => { - return cy.get(`[data-testid=${selector}]`, options); -}); - -Cypress.Commands.add('login', (username, password) => { - cy.session(username, () => { - cy.visit('/page-to-return-after-login'); - cy.getByTestid('tiUsernameForLogin').type(username); - cy.getByTestid('tiPasswordForLogin').type(password); - - cy.intercept('POST', '/_api/v3/login').as('login'); - cy.getByTestid('btnSubmitForLogin').click(); - cy.wait('@login') - }); -}); - -Cypress.Commands.add('waitUntilSkeletonDisappear', () => { - if (isHidden(Cypress.$('.grw-skeleton'))) { - return; - } - cy.get('.grw-skeleton').should('not.exist'); -}); - -Cypress.Commands.add('waitUntilSpinnerDisappear', () => { - if (isHidden(Cypress.$('.fa-spinner'))) { - return; - } - cy.get('.fa-spinner').should('not.exist'); -}); - -Cypress.Commands.add('collapseSidebar', (isCollapsed: boolean, waitUntilSaving = false) => { - cy.getByTestid('grw-sidebar').within(($sidebar) => { - - // skip if .grw-sidebar-dock does not exist - if (!$sidebar.hasClass('grw-sidebar-dock')) { - return; - } - - }); - - cy.getByTestid('grw-sidebar').should('be.visible').within(() => { - - const isSidebarContentsHidden = isHiddenByTestId('grw-sidebar-contents'); - if (isSidebarContentsHidden === isCollapsed) { - return; - } - - cy.waitUntil(() => { - // do - cy.getByTestid("btn-toggle-collapse").click({force: true}); - // wait until saving UserUISettings - if (waitUntilSaving) { - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1500); - } - - // wait until - return cy.getByTestid('grw-sidebar-contents').then($contents => isHidden($contents) === isCollapsed); - }); - }); - -}); - -Cypress.Commands.add('appendTextToEditorUntilContains', (inputText: string) => { - const lines: string[] = []; - cy.waitUntil(() => { - // do - cy.get('.CodeMirror textarea').type(inputText, { force: true }); - // until - return cy.get('.CodeMirror-line') - .each(($item) => { - lines.push($item.text()); - }).then(() => { - return lines.join('\n').endsWith(inputText); - }); - }); -}); diff --git a/apps/app/test/cypress/support/index.ts b/apps/app/test/cypress/support/index.ts deleted file mode 100644 index c36b02cbe3c..00000000000 --- a/apps/app/test/cypress/support/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import 'cypress-real-events'; - -import './assertions' -import './commands' -import './screenshot' - -// Alternatively you can use CommonJS syntax: -// require('./commands') - -// Ignore 'ResizeObserver loop limit exceeded' exception -// https://github.com/cypress-io/cypress/issues/8418 -const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/ -Cypress.on('uncaught:exception', (err) => { - /* returning false here prevents Cypress from failing the test */ - if (resizeObserverLoopErrRe.test(err.message)) { - return false - } -}) - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - interface Chainable { - getByTestid(selector: string, options?: Partial): Chainable>, - login(username: string, password: string): Chainable, - collapseSidebar(isCollapsed: boolean, waitUntilSaving?: boolean): Chainable, - waitUntilSkeletonDisappear(): Chainable, - waitUntilSpinnerDisappear(): Chainable, - appendTextToEditorUntilContains(inputText: string): Chainable - } - } -} diff --git a/apps/app/test/cypress/support/screenshot.ts b/apps/app/test/cypress/support/screenshot.ts deleted file mode 100644 index b0ae66b0fc9..00000000000 --- a/apps/app/test/cypress/support/screenshot.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BlackoutGroup } from "./blackout"; - -Cypress.Screenshot.defaults({ - blackout: [ - ...BlackoutGroup.BASIS, - ...BlackoutGroup.SIDEBAR_NAV, - ], - capture: 'viewport', -}) diff --git a/apps/app/test/cypress/tsconfig.json b/apps/app/test/cypress/tsconfig.json deleted file mode 100644 index d82a7aaadd3..00000000000 --- a/apps/app/test/cypress/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "noEmit": true, - // be explicit about types included - // to avoid clashing with Jest types - "types": ["cypress", "cypress-real-events"], - // turn off sourceMap - // see: https://github.com/cypress-io/cypress/issues/26203 - "sourceMap": false - }, - "include": [ - "../../node_modules/cypress", - "./**/*.ts" - ] -} diff --git a/bin/github-actions/generate-cypress-spec-arg.mjs b/bin/github-actions/generate-cypress-spec-arg.mjs deleted file mode 100644 index 1eb66b5ed89..00000000000 --- a/bin/github-actions/generate-cypress-spec-arg.mjs +++ /dev/null @@ -1,53 +0,0 @@ -/* eslint-disable no-console */ - -/* - * USAGE: - * node generate-cypress-spec-arg --prefix=${prefix} --suffix=${suffix} ${value} - * - * OPTIONS: - * --prefix : prefix string for each items - * --suffix : suffix string for each items - * - * EXAMPLE: - * node generate-cypress-spec-arg --prefix=${prefix}"A" --suffix="Z" "1,3,5" - * => A1Z,A3Z,A5Z - */ - -import yargs from 'yargs'; -import { hideBin } from 'yargs/helpers'; - -const argv = yargs(hideBin(process.argv)).argv; - - -const printExample = () => { - console.group('** Usage **'); - // eslint-disable-next-line no-template-curly-in-string - console.log('$ node generate-cypress-spec-arg --prefix=${prefix}"A" --suffix="Z" "1,3,5"'); - console.log(' ==> A1Z,A3Z,A5Z'); - console.groupEnd(); - console.log('\n'); -}; - - -const { prefix, suffix, _: value } = argv; - -if (prefix == null) { - printExample(); - throw new Error('The option "prefix" must be specified'); -} -if (suffix == null) { - printExample(); - throw new Error('The option "suffix" must be specified'); -} -if (value.length === 0) { - printExample(); - throw new Error('A value string must be specified'); -} - -const result = value[0] - .toString().split(',') - .map(v => v.trim()) - .map(v => `${prefix}${v}${suffix}`) - .join(','); - -console.log(result); diff --git a/package.json b/package.json index 50cf60e4767..8fdf6d56e87 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,6 @@ "@vitejs/plugin-react": "^4.3.1", "@vitest/coverage-v8": "^1.6.0", "@vitest/ui": "^1.6.0", - "cypress": "^13.3.0", - "cypress-wait-until": "^2.0.1", "eslint": "^8.41.0", "eslint-config-next": "^12.1.6", "eslint-config-weseek": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index 0486e40c545..7927607325f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1802,38 +1802,6 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz#63085d2995ca0f0e55aa8b8a07d69bfd48b844fe" integrity sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA== -"@cypress/request@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" - integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - http-signature "~1.3.6" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - performance-now "^2.1.0" - qs "6.10.4" - safe-buffer "^5.1.2" - tough-cookie "^4.1.3" - tunnel-agent "^0.6.0" - uuid "^8.3.2" - -"@cypress/xvfb@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a" - integrity sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q== - dependencies: - debug "^3.1.0" - lodash.once "^4.1.1" - "@discoveryjs/json-ext@0.5.7": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -4549,11 +4517,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.5.tgz#0dd636fe7b2c6055cbed0d4ca3b7fb540f130a96" integrity sha512-LMy+vDDcQR48EZdEx5wRX1q/sEl6NdGuHXPnfeL8ixkwCOSZ2qnIyIZmcCbdX0MeRqHhAcHmX+haCbrS8Run+A== -"@types/node@^18.17.5": - version "18.18.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.3.tgz#e5188135fc2909b46530c798ef49be65083be3fd" - integrity sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -4676,16 +4639,6 @@ "@types/mime" "^1" "@types/node" "*" -"@types/sinonjs__fake-timers@8.1.1": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" - integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== - -"@types/sizzle@^2.3.2": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef" - integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ== - "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -4797,13 +4750,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@^2.9.1": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" - integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== - dependencies: - "@types/node" "*" - "@types/zen-observable@0.8.3": version "0.8.3" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" @@ -5228,7 +5174,7 @@ ansi-colors@^4.1.1, ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -5313,11 +5259,6 @@ append-field@^1.0.0: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -arch@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - archiver-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" @@ -5582,11 +5523,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -5903,11 +5839,6 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -blob-util@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" - integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== - bluebird@3.7.2, bluebird@^3.5.0, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -6211,11 +6142,6 @@ cache-manager@^3.4.1: lodash "^4.17.21" lru-cache "6.0.0" -cachedir@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" - integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== - call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -6445,11 +6371,6 @@ check-error@^1.0.3: dependencies: get-func-name "^2.0.2" -check-more-types@^2.24.0: - version "2.24.0" - resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" - integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= - check-node-version@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/check-node-version/-/check-node-version-4.1.0.tgz#12ff45bfeb8dd591700a0ab848c21b2d8ceeeb94" @@ -6507,7 +6428,7 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^3.1.1, ci-info@^3.2.0, ci-info@^3.7.0: +ci-info@^3.2.0, ci-info@^3.7.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== @@ -6573,7 +6494,7 @@ cli-spinners@^2.5.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== -cli-table3@^0.6.1, cli-table3@~0.6.1: +cli-table3@^0.6.1: version "0.6.5" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== @@ -6582,14 +6503,6 @@ cli-table3@^0.6.1, cli-table3@~0.6.1: optionalDependencies: "@colors/colors" "1.5.0" -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -6718,7 +6631,7 @@ colord@^2.9.3: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== -colorette@^2.0.16, colorette@^2.0.20: +colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -6775,11 +6688,6 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - commander@^8.0.0, commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -6790,11 +6698,6 @@ commander@^9.1.0, commander@^9.3.0, commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -common-tags@^1.8.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" - integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -7274,65 +7177,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -cypress-real-events@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.12.0.tgz#ffeb2b23686ba5b16ac91dd9bc3b6785d36d38d3" - integrity sha512-oiy+4kGKkzc2PT36k3GGQqkGxNiVypheWjMtfyi89iIk6bYmTzeqxapaLHS3pnhZOX1IEbTDUVxh8T4Nhs1tyQ== - -cypress-wait-until@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/cypress-wait-until/-/cypress-wait-until-2.0.1.tgz#69c575c7207d83e4ae023e2aaecf2b66148c9fc0" - integrity sha512-+IyVnYNiaX1+C+V/LazrJWAi/CqiwfNoRSrFviECQEyolW1gDRy765PZosL2alSSGK8V10Y7BGfOQyZUDgmnjQ== - -cypress@^13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.3.0.tgz#d00104661b337d662c5a4280a051ee59f8aa1e31" - integrity sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw== - dependencies: - "@cypress/request" "^3.0.0" - "@cypress/xvfb" "^1.2.4" - "@types/node" "^18.17.5" - "@types/sinonjs__fake-timers" "8.1.1" - "@types/sizzle" "^2.3.2" - arch "^2.2.0" - blob-util "^2.0.2" - bluebird "^3.7.2" - buffer "^5.6.0" - cachedir "^2.3.0" - chalk "^4.1.0" - check-more-types "^2.24.0" - cli-cursor "^3.1.0" - cli-table3 "~0.6.1" - commander "^6.2.1" - common-tags "^1.8.0" - dayjs "^1.10.4" - debug "^4.3.4" - enquirer "^2.3.6" - eventemitter2 "6.4.7" - execa "4.1.0" - executable "^4.1.1" - extract-zip "2.0.1" - figures "^3.2.0" - fs-extra "^9.1.0" - getos "^3.2.1" - is-ci "^3.0.0" - is-installed-globally "~0.4.0" - lazy-ass "^1.6.0" - listr2 "^3.8.3" - lodash "^4.17.21" - log-symbols "^4.0.0" - minimist "^1.2.8" - ospath "^1.2.2" - pretty-bytes "^5.6.0" - process "^0.11.10" - proxy-from-env "1.0.0" - request-progress "^3.0.0" - semver "^7.5.3" - supports-color "^8.1.1" - tmp "~0.2.1" - untildify "^4.0.0" - yauzl "^2.10.0" - cytoscape-cose-bilkent@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz#762fa121df9930ffeb51a495d87917c570ac209b" @@ -7677,7 +7521,7 @@ date-format@^3.0.0: resolved "https://registry.yarnpkg.com/date-format/-/date-format-3.0.0.tgz#eb8780365c7d2b1511078fb491e6479780f3ad95" integrity sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w== -dayjs@^1.10.4, dayjs@^1.11.7: +dayjs@^1.11.7: version "1.11.10" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== @@ -8295,7 +8139,7 @@ enhanced-resolve@^5.10.0: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.0, enquirer@^2.3.6: +enquirer@^2.3.0: version "2.4.1" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== @@ -8604,13 +8448,6 @@ eslint-module-utils@^2.7.3: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-cypress@^2.12.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" - integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA== - dependencies: - globals "^11.12.0" - eslint-plugin-import@^2.26.0: version "2.26.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" @@ -8847,11 +8684,6 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter2@6.4.7: - version "6.4.7" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" - integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== - eventemitter3@^3.0.0, eventemitter3@^3.1.0: version "3.1.2" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" @@ -8871,21 +8703,6 @@ events@^3.0.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -execa@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - execa@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" @@ -8916,13 +8733,6 @@ execa@^8.0.1: signal-exit "^4.1.0" strip-final-newline "^3.0.0" -executable@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" - integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== - dependencies: - pify "^2.2.0" - exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -9091,17 +8901,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -9204,7 +9003,7 @@ fflate@^0.8.1: resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== -figures@^3.0.0, figures@^3.2.0: +figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -9482,16 +9281,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@~11.1.0: version "11.1.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" @@ -9650,13 +9439,6 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= -get-stream@^5.0.0, get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-stream@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" @@ -9686,13 +9468,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== -getos@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" - integrity sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q== - dependencies: - async "^3.2.0" - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -9799,13 +9574,6 @@ glob@^8.0.1, glob@^8.0.3, glob@^8.1.0: minimatch "^5.0.1" once "^1.3.0" -global-dirs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" - integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== - dependencies: - ini "2.0.0" - global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -9822,7 +9590,7 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@^11.1.0, globals@^11.12.0: +globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -10413,15 +10181,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -http-signature@~1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" - integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== - dependencies: - assert-plus "^1.0.0" - jsprim "^2.0.2" - sshpk "^1.14.1" - http2-client@^1.2.5: version "1.3.3" resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.3.tgz#90fc15d646cca86956b156d07c83947d57d659a9" @@ -10448,11 +10207,6 @@ human-id@^1.0.2: resolved "https://registry.yarnpkg.com/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3" integrity sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw== -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -10643,11 +10397,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" - integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== - ini@^1.3.5, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -10816,13 +10565,6 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" - integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== - dependencies: - ci-info "^3.1.1" - is-core-module@^2.1.0, is-core-module@^2.13.0, is-core-module@^2.2.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" @@ -10939,14 +10681,6 @@ is-hidden@^2.0.0: resolved "https://registry.yarnpkg.com/is-hidden/-/is-hidden-2.0.0.tgz#bf7461fdf98dffd8264e5cc98d046b4333d3cba3" integrity sha512-j6qZlul9T2JvFFuziqcKCSJA+2/Hhd363mZNrO/ZM83NG5Um0lGHZjtl4KS2hMvstvsTP4f9FChdL93bCmTq8A== -is-installed-globally@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" - integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== - dependencies: - global-dirs "^3.0.0" - is-path-inside "^3.0.2" - is-interactive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" @@ -11728,11 +11462,6 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - json-schema@^0.2.3: version "0.2.5" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.5.tgz#97997f50972dd0500214e208c407efa4b5d7063b" @@ -11836,16 +11565,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsprim@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-2.0.2.tgz#77ca23dbcd4135cd364800d22ff82c2185803d4d" - integrity sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz#e624f259143b9062c92b6413ff92a164c80d3ccb" @@ -12002,11 +11721,6 @@ layout-base@^2.0.0: resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285" integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg== -lazy-ass@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" - integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -12179,20 +11893,6 @@ linkify-it@^4.0.1: dependencies: uc.micro "^1.0.1" -listr2@^3.8.3: - version "3.13.5" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.5.tgz#105a813f2eb2329c4aae27373a281d610ee4985f" - integrity sha512-3n8heFQDSk+NcwBn3CgxEibZGaRzx+pC64n3YjpMD1qguV4nWus3Al+Oo3KooqFKTQEJ1v7MmnbnyyNspgx3NA== - dependencies: - cli-truncate "^2.1.0" - colorette "^2.0.16" - log-update "^4.0.0" - p-map "^4.0.0" - rfdc "^1.3.0" - rxjs "^7.4.0" - through "^2.3.8" - wrap-ansi "^7.0.0" - load-css-file@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/load-css-file/-/load-css-file-1.0.0.tgz#dac097ead6470f4c3f23d4bc5b9ff2c3decb212f" @@ -12357,7 +12057,7 @@ lodash.mergewith@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== -lodash.once@^4.0.0, lodash.once@^4.1.1: +lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= @@ -12391,7 +12091,7 @@ lodash@4.17.21, lodash@>=4.17.15, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.0.0, log-symbols@^4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -12399,16 +12099,6 @@ log-symbols@^4.0.0, log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -14084,7 +13774,7 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npm-run-path@^4.0.0, npm-run-path@^4.0.1: +npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -14396,11 +14086,6 @@ os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -ospath@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" - integrity sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs= - outdent@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.5.0.tgz#9e10982fdc41492bb473ad13840d22f9655be2ff" @@ -14838,7 +14523,7 @@ pidtree@^0.3.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== -pify@^2.0.0, pify@^2.2.0: +pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -15022,11 +14707,6 @@ prettier@^2.7.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-bytes@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" - integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== - pretty-bytes@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.1.1.tgz#38cd6bb46f47afbf667c202cfc754bffd2016a3b" @@ -15129,11 +14809,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" - integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -15143,7 +14818,7 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.28, psl@^1.1.33: +psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== @@ -15195,13 +14870,6 @@ q@^1.0.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" -qs@6.10.4: - version "6.10.4" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" - integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== - dependencies: - side-channel "^1.0.4" - qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -15235,11 +14903,6 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - queue-tick@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" @@ -16124,13 +15787,6 @@ replacestream@^4.0.3: object-assign "^4.0.1" readable-stream "^2.0.2" -request-progress@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" - integrity sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4= - dependencies: - throttleit "^1.0.0" - request-promise-core@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" @@ -16188,11 +15844,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -16292,11 +15943,6 @@ reveal.js@^4.4.0: resolved "https://registry.yarnpkg.com/reveal.js/-/reveal.js-4.4.0.tgz#bff589987a842d99bc8f6eb9b2b59f6d9941bf87" integrity sha512-jIV6C9V2NEUjGzU8L6dUFGpk1KJmq7/EzP2fOW67ggc2c0Cp/PdprWxZ9Qgp46F0T2ZWDCjQ1p3Ytzy5jA6a2w== -rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== - rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -16371,7 +16017,7 @@ rw@1: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== -rxjs@^7.4.0, rxjs@^7.5.5: +rxjs@^7.5.5: version "7.5.6" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== @@ -16809,15 +16455,6 @@ slash@^4.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -17092,7 +16729,7 @@ sqlstring@^2.3.2: resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.2.tgz#cdae7169389a1375b18e885f2e60b3e460809514" integrity sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg== -sshpk@^1.14.1, sshpk@^1.7.0: +sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== @@ -17252,7 +16889,7 @@ string-template@>=1.0.0: resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" integrity sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y= -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17270,15 +16907,6 @@ string-width@=4.2.2: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17362,7 +16990,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17376,13 +17004,6 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -17626,7 +17247,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0, supports-color@^8.1.1, supports-color@~8.1.1: +supports-color@^8.0.0, supports-color@~8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -17914,11 +17535,6 @@ throttle-debounce@^5.0.0: resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-5.0.0.tgz#a17a4039e82a2ed38a5e7268e4132d6960d41933" integrity sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg== -throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= - through2@^2.0.0, through2@~2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -17968,13 +17584,6 @@ tmp@0.0.x, tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -18064,16 +17673,6 @@ tough-cookie@^2.3.3, tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" - integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" @@ -18670,11 +18269,6 @@ universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -18699,11 +18293,6 @@ unstated@^2.1.1: dependencies: create-react-context "^0.1.5" -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - unzip-stream@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/unzip-stream/-/unzip-stream-0.3.2.tgz#e7bfd887f4c9a284b46978693ba54e0d4f5095df" @@ -18750,14 +18339,6 @@ url-join@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - url-template@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" @@ -19204,7 +18785,7 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -19222,15 +18803,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 2db9b67b518f248485677a4f8bf0db7594153cf2 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Thu, 5 Sep 2024 04:38:17 +0000 Subject: [PATCH 40/81] test ci --- .github/workflows/ci-app-prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-app-prod.yml b/.github/workflows/ci-app-prod.yml index 7a5f3b39052..ac297ebda37 100644 --- a/.github/workflows/ci-app-prod.yml +++ b/.github/workflows/ci-app-prod.yml @@ -43,7 +43,7 @@ concurrency: jobs: test-prod-node18: - uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master + uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/148125-omit-cypress with: node-version: 18.x skip-e2e-test: true @@ -52,7 +52,7 @@ jobs: test-prod-node20: - uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master + uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/148125-omit-cypress with: node-version: 20.x skip-e2e-test: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }} From 55d0452b84b0c2a6caa4d1be3f83fee76dc5d02a Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Thu, 5 Sep 2024 05:05:40 +0000 Subject: [PATCH 41/81] Revert "test ci" This reverts commit 2db9b67b518f248485677a4f8bf0db7594153cf2. --- .github/workflows/ci-app-prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-app-prod.yml b/.github/workflows/ci-app-prod.yml index ac297ebda37..7a5f3b39052 100644 --- a/.github/workflows/ci-app-prod.yml +++ b/.github/workflows/ci-app-prod.yml @@ -43,7 +43,7 @@ concurrency: jobs: test-prod-node18: - uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/148125-omit-cypress + uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master with: node-version: 18.x skip-e2e-test: true @@ -52,7 +52,7 @@ jobs: test-prod-node20: - uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/148125-omit-cypress + uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master with: node-version: 20.x skip-e2e-test: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }} From 107578c63d03260a1db1f1d2fdf3b1cd08f99607 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 05:53:57 +0000 Subject: [PATCH 42/81] prevent looping to update --- apps/app/src/stores/ui.tsx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/apps/app/src/stores/ui.tsx b/apps/app/src/stores/ui.tsx index f01fe3c7183..5ea34df1106 100644 --- a/apps/app/src/stores/ui.tsx +++ b/apps/app/src/stores/ui.tsx @@ -337,11 +337,25 @@ export const useCommentEditorDirtyMap = (): SWRResponse, Er *********************************************************** */ export const useIsAbleToShowTrashPageManagementButtons = (): SWRResponse => { - const { data: currentUser } = useCurrentUser(); - const { data: isReadOnlyUser } = useIsReadOnlyUser(); - const { data: isTrashPage } = useIsTrashPage(); + const key = 'isAbleToShowTrashPageManagementButtons'; - return useStaticSWR('isAbleToShowTrashPageManagementButtons', isTrashPage && currentUser != null && !isReadOnlyUser); + const { data: _currentUser } = useCurrentUser(); + const isCurrentUserExist = _currentUser != null; + + const { data: _currentPageId } = useCurrentPageId(); + const { data: _isNotFound } = useIsNotFound(); + const { data: _isTrashPage } = useIsTrashPage(); + const { data: _isReadOnlyUser } = useIsReadOnlyUser(); + const isPageExist = _currentPageId != null && _isNotFound === false; + const isTrashPage = isPageExist && _isTrashPage === true; + const isReadOnlyUser = isPageExist && _isReadOnlyUser === true; + + const includesUndefined = [_currentUser, _currentPageId, _isNotFound, _isReadOnlyUser, _isTrashPage].some(v => v === undefined); + + return useSWRImmutable( + includesUndefined ? null : [key, isTrashPage, isCurrentUserExist, isReadOnlyUser], + ([, isTrashPage, isCurrentUserExist, isReadOnlyUser]) => isTrashPage && isCurrentUserExist && !isReadOnlyUser, + ); }; export const useIsAbleToShowPageManagement = (): SWRResponse => { From e5c494f56784f912966d24ede95575eec0201e31 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Thu, 5 Sep 2024 09:14:13 +0000 Subject: [PATCH 43/81] cypress -> playwright --- apps/app/regconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/regconfig.json b/apps/app/regconfig.json index 3a63e732d3c..287a31bfca7 100644 --- a/apps/app/regconfig.json +++ b/apps/app/regconfig.json @@ -1,7 +1,7 @@ { "core": { "workingDir": ".reg", - "actualDir": "test/cypress/screenshots", + "actualDir": "test/playwright/screenshots", "thresholdRate": 0.001, "addIgnore": true, "ximgdiff": { From a846e068793287e46132b72a936a0cf126699f96 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:01:40 +0000 Subject: [PATCH 44/81] move mergify configuration file --- .mergify.yml => .github/mergify.yml | 0 .github/workflows/ci-app-prod.yml | 2 ++ 2 files changed, 2 insertions(+) rename .mergify.yml => .github/mergify.yml (100%) diff --git a/.mergify.yml b/.github/mergify.yml similarity index 100% rename from .mergify.yml rename to .github/mergify.yml diff --git a/.github/workflows/ci-app-prod.yml b/.github/workflows/ci-app-prod.yml index 7a5f3b39052..d3f67baffe4 100644 --- a/.github/workflows/ci-app-prod.yml +++ b/.github/workflows/ci-app-prod.yml @@ -7,6 +7,7 @@ on: - dev/7.*.x - dev/6.*.x paths: + - .github/mergify.yml - .github/workflows/ci-app-prod.yml - .github/workflows/reusable-app-prod.yml - .github/workflows/reusable-app-reg-suit.yml @@ -24,6 +25,7 @@ on: - dev/6.*.x types: [opened, reopened, synchronize] paths: + - .github/mergify.yml - .github/workflows/ci-app-prod.yml - .github/workflows/reusable-app-prod.yml - .github/workflows/reusable-app-reg-suit.yml From 7d0ccf2e8ee8936d4af658d1734634943baac955 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:03:40 +0000 Subject: [PATCH 45/81] add mergify queue configurations --- .github/mergify.yml | 27 +++++++++++++++++-------- .github/workflows/reusable-app-prod.yml | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index f77c4d03225..319c65d0572 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,16 +1,27 @@ +queue_rules: + - name: default + allow_inplace_checks: false + queue_conditions: + - '#approved-reviews-by >= 2' + - check-success = "check-title" + - check-success = "Node CI for slackbot-proxy" + - check-success = "Node CI for app development" + merge_conditions: + - '#approved-reviews-by >= 2' + - check-success = "check-title" + - check-success = "Node CI for slackbot-proxy" + - check-success = "Node CI for app development" + - check-success = "Node CI for app production" + pull_request_rules: - name: Automatic merge for Dependabot pull requests conditions: - author = dependabot[bot] - '#approved-reviews-by >= 1' - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" - - check-success = "test-prod-node18 / launch-prod" - - check-success = "test-prod-node20 / launch-prod" + - check-success = "check-title" + - check-success = "Node CI for slackbot-proxy" + - check-success = "Node CI for app development" + - check-success = "Node CI for app production" actions: merge: method: merge diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml index a51a822525b..25093dc42cf 100644 --- a/.github/workflows/reusable-app-prod.yml +++ b/.github/workflows/reusable-app-prod.yml @@ -199,7 +199,7 @@ jobs: run-playwright: needs: [build-prod] - if: ${{ !inputs.skip-e2e-test }} + if: ${{ !inputs.skip-e2e-test && startsWith(github.head_ref, 'mergify/merge-queue/') }} runs-on: ubuntu-latest container: From 5f74f85110a1b5d113e92f0bcb1d998ba81fe36a Mon Sep 17 00:00:00 2001 From: Futa Arai Date: Thu, 5 Sep 2024 19:09:45 +0900 Subject: [PATCH 46/81] return error when grant is string --- apps/app/src/server/routes/apiv3/page/update-page.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/app/src/server/routes/apiv3/page/update-page.ts b/apps/app/src/server/routes/apiv3/page/update-page.ts index 70e9b5eb197..bf3db74c782 100644 --- a/apps/app/src/server/routes/apiv3/page/update-page.ts +++ b/apps/app/src/server/routes/apiv3/page/update-page.ts @@ -54,7 +54,9 @@ export const updatePageHandlersFactory: UpdatePageHandlersFactory = (crowi) => { .withMessage("'revisionId' must be specified"), body('body').exists().isString() .withMessage("Empty value is not allowed for 'body'"), - body('grant').optional().isInt({ min: 0, max: 5 }).withMessage('grant must be integer from 1 to 5'), + body('grant').optional().not().isString() + .isInt({ min: 0, max: 5 }) + .withMessage('grant must be an integer from 1 to 5'), body('userRelatedGrantUserGroupIds').optional().isArray().withMessage('userRelatedGrantUserGroupIds must be an array of group id'), body('overwriteScopesOfDescendants').optional().isBoolean().withMessage('overwriteScopesOfDescendants must be boolean'), body('isSlackEnabled').optional().isBoolean().withMessage('isSlackEnabled must be boolean'), From 6d458a5b17e6553c1b3bc82e736c1f45e87b359e Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:12:30 +0000 Subject: [PATCH 47/81] update mergify configurations --- .github/mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 319c65d0572..3003908c295 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -19,9 +19,9 @@ pull_request_rules: - author = dependabot[bot] - '#approved-reviews-by >= 1' - check-success = "check-title" - - check-success = "Node CI for slackbot-proxy" - - check-success = "Node CI for app development" - - check-success = "Node CI for app production" + - check-success ~= "Node CI for slackbot-proxy \/.*" + - check-success ~= "Node CI for app development \/.*" + - check-success ~= "Node CI for app production \/.*" actions: merge: method: merge From 81076ed75f51f8aa8b3fe527a4ed3f9c53601908 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:23:57 +0000 Subject: [PATCH 48/81] update mergify configurations --- .github/mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 3003908c295..61513b8f539 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -19,9 +19,9 @@ pull_request_rules: - author = dependabot[bot] - '#approved-reviews-by >= 1' - check-success = "check-title" - - check-success ~= "Node CI for slackbot-proxy \/.*" - - check-success ~= "Node CI for app development \/.*" - - check-success ~= "Node CI for app production \/.*" + - check-success ~= "Node CI for slackbot-proxy / .*" + - check-success ~= "Node CI for app development / .*" + - check-success ~= "Node CI for app production / .*" actions: merge: method: merge From 843e5411eed40617cbc689fb367370a5eee9df62 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:29:58 +0000 Subject: [PATCH 49/81] update mergify configurations --- .github/mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 61513b8f539..94490282670 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -19,9 +19,9 @@ pull_request_rules: - author = dependabot[bot] - '#approved-reviews-by >= 1' - check-success = "check-title" - - check-success ~= "Node CI for slackbot-proxy / .*" - - check-success ~= "Node CI for app development / .*" - - check-success ~= "Node CI for app production / .*" + - check-success ~= Node CI for slackbot-proxy / .* + - check-success ~= Node CI for app development / .* + - check-success ~= Node CI for app production / .* actions: merge: method: merge From 9b366745432c7aae912ba606bf0365e7bdc35276 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 10:45:38 +0000 Subject: [PATCH 50/81] update mergify.yml --- .github/mergify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 94490282670..ce61e870059 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -21,7 +21,9 @@ pull_request_rules: - check-success = "check-title" - check-success ~= Node CI for slackbot-proxy / .* - check-success ~= Node CI for app development / .* - - check-success ~= Node CI for app production / .* + - check-success = test-prod-node20 + - check-success ~= test-prod-node20 + - check-success ~= test-prod-node20 / .* actions: merge: method: merge From bb57681922baf0af0da3a01ae7eed972687888d1 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Thu, 5 Sep 2024 11:01:06 +0000 Subject: [PATCH 51/81] update mergify.yml --- .github/mergify.yml | 46 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index ce61e870059..924f79b709e 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -4,26 +4,52 @@ queue_rules: queue_conditions: - '#approved-reviews-by >= 2' - check-success = "check-title" - - check-success = "Node CI for slackbot-proxy" - - check-success = "Node CI for app development" + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" merge_conditions: - '#approved-reviews-by >= 2' - check-success = "check-title" - - check-success = "Node CI for slackbot-proxy" - - check-success = "Node CI for app development" - - check-success = "Node CI for app production" + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" + - check-success = "test-prod-node18 / launch-prod" + - check-success = "test-prod-node20 / launch-prod" pull_request_rules: + - name: Automatic queue to merge + conditions: + - '#approved-reviews-by >= 1' + - check-success = "check-title" + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" + actions: + queue: + method: merge + - name: Automatic merge for Dependabot pull requests conditions: - author = dependabot[bot] - '#approved-reviews-by >= 1' - check-success = "check-title" - - check-success ~= Node CI for slackbot-proxy / .* - - check-success ~= Node CI for app development / .* - - check-success = test-prod-node20 - - check-success ~= test-prod-node20 - - check-success ~= test-prod-node20 / .* + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" + - check-success = "test-prod-node18 / launch-prod" + - check-success = "test-prod-node20 / launch-prod" actions: merge: method: merge From 6e2492072b3505e3c52fb1b4c370ab9ba020bab7 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 6 Sep 2024 07:10:48 +0000 Subject: [PATCH 52/81] bugFIx --- .../client/components/Admin/G2GDataTransferExportForm.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx index 626093e51be..898b3102cbb 100644 --- a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx +++ b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx @@ -92,7 +92,9 @@ const G2GDataTransferExportForm = (props: Props): JSX.Element => { {collectionNames.map((collectionName) => { const isConfigButtonAvailable = Object.keys(IMPORT_OPTION_CLASS_MAPPING).includes(collectionName); - if (optionsMap[collectionName] == null) { + // console.log(optionsMap); + + if (optionsMap[collectionName] == null || optionsMap[collectionName].mode === undefined) { return null; } @@ -188,7 +190,8 @@ const G2GDataTransferExportForm = (props: Props): JSX.Element => { ? MODE_RESTRICTED_COLLECTION[collectionName][0] : DEFAULT_MODE; const ImportOption = IMPORT_OPTION_CLASS_MAPPING[collectionName] || GrowiArchiveImportOption; - initialOptionsMap[collectionName] = new ImportOption(initialMode); + initialOptionsMap[collectionName] = new ImportOption(collectionName, initialMode); + console.log('initialOptionsMap[collectionName]', initialOptionsMap[collectionName]); }); updateOptionsMap(initialOptionsMap); }, [allCollectionNames, updateOptionsMap]); From 9b31380644ddb7cdc149f389dcb189b87c88babc Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 6 Sep 2024 09:39:52 +0000 Subject: [PATCH 53/81] Mutate when revision switches --- apps/app/src/stores/page.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/app/src/stores/page.tsx b/apps/app/src/stores/page.tsx index a0365610644..084d6033979 100644 --- a/apps/app/src/stores/page.tsx +++ b/apps/app/src/stores/page.tsx @@ -81,6 +81,11 @@ export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|nu return true; } + // mutate When a different revision is opened + if (cachedData.revision?._id != null && initialData.revision?._id != null && cachedData.revision._id !== initialData.revision._id) { + return true; + } + return false; })(); From 611064f994003965922ea7fca930d356444efe4e Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 6 Sep 2024 09:42:03 +0000 Subject: [PATCH 54/81] Add revisionId to the dependency array --- apps/app/src/pages/[[...path]].page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/app/src/pages/[[...path]].page.tsx b/apps/app/src/pages/[[...path]].page.tsx index 496bc139639..b74a6b6bb74 100644 --- a/apps/app/src/pages/[[...path]].page.tsx +++ b/apps/app/src/pages/[[...path]].page.tsx @@ -288,7 +288,12 @@ const Page: NextPageWithLayout = (props: Props) => { // Because pageWIthMeta does not contain revision.body mutatePageData(); } - }, [currentPageId, mutateCurrentPage, mutateCurrentPageYjsDataFromApi, mutateEditingMarkdown, props.isNotFound, props.skipSSR]); + + // Add pageWithMeta?.data.revision?._id to the dependency array as it should mutate when revisionId changes + }, [ + currentPageId, mutateCurrentPage, mutateCurrentPageYjsDataFromApi, mutateEditingMarkdown, + props.isNotFound, props.skipSSR, pageWithMeta?.data.revision?._id, + ]); // sync pathname by Shallow Routing https://nextjs.org/docs/routing/shallow-routing useEffect(() => { From 31c65868172d5b5e48a060286d264c5e8a722ae5 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:14:43 +0000 Subject: [PATCH 55/81] add if section --- .github/workflows/ci-slackbot-proxy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-slackbot-proxy.yml b/.github/workflows/ci-slackbot-proxy.yml index a69ea6ac569..d9d8a417656 100644 --- a/.github/workflows/ci-slackbot-proxy.yml +++ b/.github/workflows/ci-slackbot-proxy.yml @@ -175,6 +175,9 @@ jobs: ci-slackbot-proxy-launch-prod: + + if: startsWith(github.head_ref, 'mergify/merge-queue/') + runs-on: ubuntu-latest strategy: From e75fc3716432700682b030cb5171fa7fe8fb50fa Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:15:10 +0000 Subject: [PATCH 56/81] update mergify.yml for Two-Step CI --- .github/mergify.yml | 54 ++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 924f79b709e..030eaa72df1 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -2,54 +2,44 @@ queue_rules: - name: default allow_inplace_checks: false queue_conditions: - - '#approved-reviews-by >= 2' - check-success = "check-title" - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" + - or: + - and: + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - and: + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" merge_conditions: - - '#approved-reviews-by >= 2' - check-success = "check-title" - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" - - check-success = "test-prod-node18 / launch-prod" - - check-success = "test-prod-node20 / launch-prod" + - "#check-failure=0" + - or: + - and: + - check-success = "ci-slackbot-proxy-lint (20.x)" + - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - and: + - check-success = "ci-app-lint (20.x)" + - check-success = "ci-app-test (20.x)" + - check-success = "ci-app-launch-dev (20.x)" + - check-success = "test-prod-node18 / launch-prod" + - check-success = "test-prod-node20 / launch-prod" pull_request_rules: - name: Automatic queue to merge conditions: - '#approved-reviews-by >= 1' - - check-success = "check-title" - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" + - '#review-requested = 0' actions: queue: - method: merge - name: Automatic merge for Dependabot pull requests conditions: - author = dependabot[bot] - '#approved-reviews-by >= 1' + - "#check-failure=0" - check-success = "check-title" - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" - - check-success = "test-prod-node18 / launch-prod" - - check-success = "test-prod-node20 / launch-prod" actions: merge: method: merge From 7aefc2f75f6ddf5f7a8df955890b69d2bda740aa Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:24:57 +0000 Subject: [PATCH 57/81] update mergify.yml --- .github/mergify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 030eaa72df1..6b2320bfdb9 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -2,6 +2,7 @@ queue_rules: - name: default allow_inplace_checks: false queue_conditions: + - "#check-failure=0" - check-success = "check-title" - or: - and: @@ -12,7 +13,6 @@ queue_rules: - check-success = "ci-app-test (20.x)" - check-success = "ci-app-launch-dev (20.x)" merge_conditions: - - check-success = "check-title" - "#check-failure=0" - or: - and: From fa79f3a5e95d7e926fde016b5391cc7492938db3 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:28:11 +0000 Subject: [PATCH 58/81] update mergify.yml --- .github/mergify.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 6b2320bfdb9..66f61707806 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -29,8 +29,11 @@ queue_rules: pull_request_rules: - name: Automatic queue to merge conditions: - - '#approved-reviews-by >= 1' - - '#review-requested = 0' + - or: + - label = automerge + - and: + - '#approved-reviews-by >= 1' + - '#review-requested = 0' actions: queue: From ed9d0cb18e8097eefbba491942db7bf74fcb17d4 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:31:31 +0000 Subject: [PATCH 59/81] Revert "update mergify.yml" This reverts commit fa79f3a5e95d7e926fde016b5391cc7492938db3. --- .github/mergify.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 66f61707806..6b2320bfdb9 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -29,11 +29,8 @@ queue_rules: pull_request_rules: - name: Automatic queue to merge conditions: - - or: - - label = automerge - - and: - - '#approved-reviews-by >= 1' - - '#review-requested = 0' + - '#approved-reviews-by >= 1' + - '#review-requested = 0' actions: queue: From ca1717e96ebe2eea265956c6bfda74f9a731df93 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 13:39:57 +0000 Subject: [PATCH 60/81] update mergify.yml --- .github/mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 6b2320bfdb9..2420838ca3a 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -2,7 +2,7 @@ queue_rules: - name: default allow_inplace_checks: false queue_conditions: - - "#check-failure=0" + - '#check-failure = 0' - check-success = "check-title" - or: - and: @@ -13,7 +13,7 @@ queue_rules: - check-success = "ci-app-test (20.x)" - check-success = "ci-app-launch-dev (20.x)" merge_conditions: - - "#check-failure=0" + - '#check-failure = 0' - or: - and: - check-success = "ci-slackbot-proxy-lint (20.x)" @@ -38,7 +38,7 @@ pull_request_rules: conditions: - author = dependabot[bot] - '#approved-reviews-by >= 1' - - "#check-failure=0" + - '#check-failure = 0' - check-success = "check-title" actions: merge: From 65ec8624720a7197160264dbfc6fa7cc247b07e6 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 14:05:44 +0000 Subject: [PATCH 61/81] update workflows --- .github/workflows/ci-app.yml | 1 + .github/workflows/ci-slackbot-proxy.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci-app.yml b/.github/workflows/ci-app.yml index b9c48e50eed..bb3f3014856 100644 --- a/.github/workflows/ci-app.yml +++ b/.github/workflows/ci-app.yml @@ -7,6 +7,7 @@ on: - rc/** - changeset-release/** paths: + - .github/mergify.yml - .github/workflows/ci-app.yml - .eslint* - tsconfig.base.json diff --git a/.github/workflows/ci-slackbot-proxy.yml b/.github/workflows/ci-slackbot-proxy.yml index d9d8a417656..2c7537289e6 100644 --- a/.github/workflows/ci-slackbot-proxy.yml +++ b/.github/workflows/ci-slackbot-proxy.yml @@ -7,6 +7,7 @@ on: - rc/** - support/prepare-v** paths: + - .github/mergify.yml - .github/workflows/ci-slackbot-proxy.yml - .eslint* - tsconfig.base.json From 12e5479142c892da0d12545ab213374abccea69b Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 14:44:39 +0000 Subject: [PATCH 62/81] supress rendering --- .../Bookmarks/BookmarkFolderItemControl.tsx | 53 ++++++++++--------- .../Bookmarks/BookmarkFolderMenu.tsx | 21 ++++---- .../Common/Dropdown/PageItemControl.tsx | 22 ++++---- .../InAppNotificationDropdown.tsx | 23 ++++---- 4 files changed, 65 insertions(+), 54 deletions(-) diff --git a/apps/app/src/client/components/Bookmarks/BookmarkFolderItemControl.tsx b/apps/app/src/client/components/Bookmarks/BookmarkFolderItemControl.tsx index a84ec3da0e8..7e92e6643c5 100644 --- a/apps/app/src/client/components/Bookmarks/BookmarkFolderItemControl.tsx +++ b/apps/app/src/client/components/Bookmarks/BookmarkFolderItemControl.tsx @@ -26,37 +26,40 @@ export const BookmarkFolderItemControl: React.FC<{ more_horiz ) } - - {onClickMoveToRoot && ( + + { isOpen && ( + + {onClickMoveToRoot && ( + + bookmark + {t('bookmark_folder.move_to_root')} + + )} - bookmark - {t('bookmark_folder.move_to_root')} + redo + {t('Rename')} - )} - - redo - {t('Rename')} - - + - - delete - {t('Delete')} - - + + delete + {t('Delete')} + + + ) } ); }; diff --git a/apps/app/src/client/components/Bookmarks/BookmarkFolderMenu.tsx b/apps/app/src/client/components/Bookmarks/BookmarkFolderMenu.tsx index 466e9d5b226..95eb5a10e21 100644 --- a/apps/app/src/client/components/Bookmarks/BookmarkFolderMenu.tsx +++ b/apps/app/src/client/components/Bookmarks/BookmarkFolderMenu.tsx @@ -186,15 +186,18 @@ export const BookmarkFolderMenu = (props: BookmarkFolderMenuProps): JSX.Element onToggle={toggleHandler} > {children} - - { renderBookmarkMenuItem() } - + + { isOpen && ( + + { renderBookmarkMenuItem() } + + ) } ); }; diff --git a/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx b/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx index 5a3643451a1..2d0a4dcc362 100644 --- a/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx +++ b/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx @@ -343,16 +343,18 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps): ) } - + { isOpen && ( + + ) } diff --git a/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx b/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx index 3f5e4ff227f..06a1d08b552 100644 --- a/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx +++ b/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx @@ -86,18 +86,21 @@ export const InAppNotificationDropdown = (): JSX.Element => { notifications {badge} - - { inAppNotificationData != null && inAppNotificationData.docs.length === 0 + + { isOpen && ( + + { inAppNotificationData != null && inAppNotificationData.docs.length === 0 // no items - ? {t('in_app_notification.mark_all_as_read')} + ? {t('in_app_notification.mark_all_as_read')} // render DropdownItem - : - } - - - { t('in_app_notification.see_all') } - - + : + } + + + { t('in_app_notification.see_all') } + + + ) } ); }; From 2be7e4c5786e223a001575087de11b204418d163 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 20:16:02 +0000 Subject: [PATCH 63/81] fix component test --- .../Common/Dropdown/PageItemControl.spec.tsx | 77 +++++++++++-------- .../Common/Dropdown/PageItemControl.tsx | 4 +- 2 files changed, 49 insertions(+), 32 deletions(-) diff --git a/apps/app/src/client/components/Common/Dropdown/PageItemControl.spec.tsx b/apps/app/src/client/components/Common/Dropdown/PageItemControl.spec.tsx index 2e14573379a..e85c064af3c 100644 --- a/apps/app/src/client/components/Common/Dropdown/PageItemControl.spec.tsx +++ b/apps/app/src/client/components/Common/Dropdown/PageItemControl.spec.tsx @@ -1,37 +1,54 @@ -import { render, screen, waitFor } from '@testing-library/react'; -import userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event'; +import { type IPageInfoForOperation } from '@growi/core/dist/interfaces'; +import { + fireEvent, render, screen, within, +} from '@testing-library/react'; +import { mock } from 'vitest-mock-extended'; import { PageItemControl } from './PageItemControl'; +// mock for isIPageInfoForOperation + +const mocks = vi.hoisted(() => ({ + isIPageInfoForOperationMock: vi.fn(), +})); + +vi.mock('@growi/core/dist/interfaces', () => ({ + isIPageInfoForOperation: mocks.isIPageInfoForOperationMock, +})); + + describe('PageItemControl.tsx', () => { - it('Should trigger onClickRenameMenuItem() when clicking the rename button with pageInfo.isDeletable being "false"', async() => { - // setup - const onClickRenameMenuItemMock = vi.fn(); - - const pageInfo = { - isMovable: true, - isV5Compatible: true, - isEmpty: false, - isDeletable: false, - isAbleToDeleteCompletely: true, - isRevertible: true, - }; - - const props = { - pageId: 'dummy-page-id', - isEnableActions: true, - pageInfo, - onClickRenameMenuItem: onClickRenameMenuItemMock, - }; - - render(); - - // when - const openPageMoveRenameModalButton = screen.getByTestId('rename-page-btn'); - await waitFor(() => userEvent.click(openPageMoveRenameModalButton, { pointerEventsCheck: PointerEventsCheckLevel.Never })); - - // then - expect(onClickRenameMenuItemMock).toHaveBeenCalled(); + describe('Should trigger onClickRenameMenuItem() when clicking the rename button', () => { + it('without fetching PageInfo by useSWRxPageInfo', async() => { + // setup + const pageInfo = mock(); + + const onClickRenameMenuItemMock = vi.fn(); + // return true when the argument is pageInfo in order to supress fetching + mocks.isIPageInfoForOperationMock.mockImplementation((arg) => { + if (arg === pageInfo) { + return true; + } + }); + + const props = { + pageId: 'dummy-page-id', + isEnableActions: true, + pageInfo, + onClickRenameMenuItem: onClickRenameMenuItemMock, + }; + + render(); + + // when + const button = within(screen.getByTestId('open-page-item-control-btn')).getByText(/more_vert/); + fireEvent.click(button); + const renameMenuItem = await screen.findByTestId('rename-page-btn'); + fireEvent.click(renameMenuItem); + + // then + expect(onClickRenameMenuItemMock).toHaveBeenCalled(); + }); }); }); diff --git a/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx b/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx index 2d0a4dcc362..5d6bdb51ad8 100644 --- a/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx +++ b/apps/app/src/client/components/Common/Dropdown/PageItemControl.tsx @@ -4,7 +4,7 @@ import React, { import { type IPageInfoAll, isIPageInfoForOperation, -} from '@growi/core'; +} from '@growi/core/dist/interfaces'; import { LoadingSpinner } from '@growi/ui/dist/components'; import { useTranslation } from 'next-i18next'; import { @@ -338,7 +338,7 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps): setIsOpen(!isOpen)} className="grw-page-item-control" data-testid="open-page-item-control-btn"> { children ?? ( - + more_vert ) } From 29bb8599adba6891ea917728809b7b1f60617b59 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 20:29:31 +0000 Subject: [PATCH 64/81] exclude merge queue PR --- .github/workflows/auto-labeling.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-labeling.yml b/.github/workflows/auto-labeling.yml index 3f9e702f0e5..1ce8d5d835c 100644 --- a/.github/workflows/auto-labeling.yml +++ b/.github/workflows/auto-labeling.yml @@ -36,6 +36,7 @@ jobs: if: | (!contains( github.event.pull_request.labels.*.name, 'flag/exclude-from-changelog' ) && !startsWith( github.head_ref, 'changeset-release/' ) + && !startsWith( github.head_ref, 'mergify/merge-queue/' ) && !startsWith( github.head_ref, 'dependabot/' )) steps: From d125170882a7eedf7dd4b4f113f20a5ae6e9b129 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 20:59:20 +0000 Subject: [PATCH 65/81] update mergify.yml --- .github/mergify.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 2420838ca3a..600006e95c8 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -6,25 +6,17 @@ queue_rules: - check-success = "check-title" - or: - and: - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" + - check-success ~= ci-slackbot-proxy- - and: - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" + - check-success ~= ci-app- merge_conditions: - '#check-failure = 0' - or: - and: - - check-success = "ci-slackbot-proxy-lint (20.x)" - - check-success = "ci-slackbot-proxy-launch-dev (20.x)" - - check-success = "ci-slackbot-proxy-launch-prod (20.x)" + - check-success ~= ci-slackbot-proxy- - and: - - check-success = "ci-app-lint (20.x)" - - check-success = "ci-app-test (20.x)" - - check-success = "ci-app-launch-dev (20.x)" - - check-success = "test-prod-node18 / launch-prod" - - check-success = "test-prod-node20 / launch-prod" + - check-success ~= ci-app- + - check-success ~= test-prod-node20 / pull_request_rules: - name: Automatic queue to merge From 2dff6a041f41ea190b3ea68e98b8bb34f40b34c0 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 6 Sep 2024 21:03:45 +0000 Subject: [PATCH 66/81] update auto-labeling.yml --- .github/workflows/auto-labeling.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-labeling.yml b/.github/workflows/auto-labeling.yml index 1ce8d5d835c..f5951e0a4fe 100644 --- a/.github/workflows/auto-labeling.yml +++ b/.github/workflows/auto-labeling.yml @@ -21,7 +21,8 @@ jobs: if: | (!contains( github.event.pull_request.labels.*.name, 'flag/exclude-from-changelog' ) - && !startsWith( github.head_ref, 'changeset-release/' )) + && !startsWith( github.head_ref, 'changeset-release/' ) + && !startsWith( github.head_ref, 'mergify/merge-queue/' )) steps: - uses: release-drafter/release-drafter@v5 From bca24c5615805feced78b62585695569807632db Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Sat, 7 Sep 2024 16:22:58 +0000 Subject: [PATCH 67/81] improve typing --- apps/slackbot-proxy/src/services/LinkSharedService.ts | 4 ++-- .../src/mdast-util-growi-directive/complex-types.d.ts | 2 +- packages/slack/src/interfaces/growi-event-processor.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/slackbot-proxy/src/services/LinkSharedService.ts b/apps/slackbot-proxy/src/services/LinkSharedService.ts index 1df354f9873..f310b4f3f7a 100644 --- a/apps/slackbot-proxy/src/services/LinkSharedService.ts +++ b/apps/slackbot-proxy/src/services/LinkSharedService.ts @@ -3,7 +3,7 @@ import type { WebClient } from '@slack/web-api'; import { Inject, Service } from '@tsed/di'; import axios from 'axios'; -import { RelationRepository } from '~/repositories/relation'; +import type { RelationRepository } from '~/repositories/relation'; import loggerFactory from '~/utils/logger'; const logger = loggerFactory('slackbot-proxy:services:LinkSharedService'); @@ -42,7 +42,7 @@ type PublicData = { export type DataForLinkShared = PrivateData | PublicData; @Service() -export class LinkSharedService implements GrowiEventProcessor { +export class LinkSharedService implements GrowiEventProcessor { @Inject() relationRepository: RelationRepository; diff --git a/packages/remark-growi-directive/src/mdast-util-growi-directive/complex-types.d.ts b/packages/remark-growi-directive/src/mdast-util-growi-directive/complex-types.d.ts index e5233741a21..b8a74c5bf4d 100644 --- a/packages/remark-growi-directive/src/mdast-util-growi-directive/complex-types.d.ts +++ b/packages/remark-growi-directive/src/mdast-util-growi-directive/complex-types.d.ts @@ -1,7 +1,7 @@ import type { PhrasingContent } from 'mdast'; import type { Parent } from 'unist'; -import { DirectiveType } from './consts.js'; +import type { DirectiveType } from './consts.js'; type DirectiveAttributes = Record diff --git a/packages/slack/src/interfaces/growi-event-processor.ts b/packages/slack/src/interfaces/growi-event-processor.ts index 6b40647a0dc..d71a7d329ca 100644 --- a/packages/slack/src/interfaces/growi-event-processor.ts +++ b/packages/slack/src/interfaces/growi-event-processor.ts @@ -1,7 +1,7 @@ import type { WebClient } from '@slack/web-api'; -export interface GrowiEventProcessor { +export interface GrowiEventProcessor { shouldHandleEvent(eventType: string): boolean; - processEvent(client: WebClient, event: any): Promise; + processEvent(client: WebClient, event: EVENT): Promise; } From 477131bce897a153981707b7c7a22ced099b59a7 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 9 Sep 2024 01:58:53 +0000 Subject: [PATCH 68/81] fix fb --- apps/app/src/pages/[[...path]].page.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/app/src/pages/[[...path]].page.tsx b/apps/app/src/pages/[[...path]].page.tsx index b74a6b6bb74..4dd4124783e 100644 --- a/apps/app/src/pages/[[...path]].page.tsx +++ b/apps/app/src/pages/[[...path]].page.tsx @@ -245,6 +245,7 @@ const Page: NextPageWithLayout = (props: Props) => { const { pageWithMeta } = props; const pageId = pageWithMeta?.data._id; + const revisionId = pageWithMeta?.data.revision?._id; const revisionBody = pageWithMeta?.data.revision?.body; useCurrentPathname(props.currentPathname); @@ -277,7 +278,7 @@ const Page: NextPageWithLayout = (props: Props) => { return; } - if (currentPageId != null && !props.isNotFound) { + if (currentPageId != null && revisionId != null && !props.isNotFound) { const mutatePageData = async() => { const pageData = await mutateCurrentPage(); mutateEditingMarkdown(pageData?.revision?.body); @@ -288,11 +289,9 @@ const Page: NextPageWithLayout = (props: Props) => { // Because pageWIthMeta does not contain revision.body mutatePageData(); } - - // Add pageWithMeta?.data.revision?._id to the dependency array as it should mutate when revisionId changes }, [ - currentPageId, mutateCurrentPage, mutateCurrentPageYjsDataFromApi, mutateEditingMarkdown, - props.isNotFound, props.skipSSR, pageWithMeta?.data.revision?._id, + revisionId, currentPageId, mutateCurrentPage, + mutateCurrentPageYjsDataFromApi, mutateEditingMarkdown, props.isNotFound, props.skipSSR, ]); // sync pathname by Shallow Routing https://nextjs.org/docs/routing/shallow-routing @@ -313,8 +312,8 @@ const Page: NextPageWithLayout = (props: Props) => { }, [mutateEditingMarkdown, revisionBody, props.currentPathname]); useEffect(() => { - mutateRemoteRevisionId(pageWithMeta?.data.revision?._id); - }, [mutateRemoteRevisionId, pageWithMeta?.data.revision?._id]); + mutateRemoteRevisionId(revisionId); + }, [mutateRemoteRevisionId, revisionId]); useEffect(() => { mutateCurrentPageId(pageId ?? null); From 4bb07522c89fe1f3398e53d56ce86b68a4c806d1 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 9 Sep 2024 02:24:34 +0000 Subject: [PATCH 69/81] rm logger --- .../client/components/Admin/G2GDataTransferExportForm.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx index 898b3102cbb..ae5eb01bff6 100644 --- a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx +++ b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx @@ -92,9 +92,7 @@ const G2GDataTransferExportForm = (props: Props): JSX.Element => { {collectionNames.map((collectionName) => { const isConfigButtonAvailable = Object.keys(IMPORT_OPTION_CLASS_MAPPING).includes(collectionName); - // console.log(optionsMap); - - if (optionsMap[collectionName] == null || optionsMap[collectionName].mode === undefined) { + if (optionsMap[collectionName] == null) { return null; } @@ -191,7 +189,6 @@ const G2GDataTransferExportForm = (props: Props): JSX.Element => { : DEFAULT_MODE; const ImportOption = IMPORT_OPTION_CLASS_MAPPING[collectionName] || GrowiArchiveImportOption; initialOptionsMap[collectionName] = new ImportOption(collectionName, initialMode); - console.log('initialOptionsMap[collectionName]', initialOptionsMap[collectionName]); }); updateOptionsMap(initialOptionsMap); }, [allCollectionNames, updateOptionsMap]); From 6b6b49e7dc0b8a51d93d34fba60ac3d9053400d9 Mon Sep 17 00:00:00 2001 From: WNomunomu Date: Mon, 9 Sep 2024 07:13:48 +0000 Subject: [PATCH 70/81] fix className to display icons --- apps/app/src/client/components/PageComment/ReplyComments.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/client/components/PageComment/ReplyComments.tsx b/apps/app/src/client/components/PageComment/ReplyComments.tsx index 5a21b67a7f4..93afed4c421 100644 --- a/apps/app/src/client/components/PageComment/ReplyComments.tsx +++ b/apps/app/src/client/components/PageComment/ReplyComments.tsx @@ -69,7 +69,7 @@ export const ReplyComments = (props: ReplycommentsProps): JSX.Element => { const areThereHiddenReplies = (replyList.length > 2); const toggleButtonIconName = isOlderRepliesShown ? 'expand_less' : 'more_vert'; - const toggleButtonIcon = {toggleButtonIconName}; + const toggleButtonIcon = {toggleButtonIconName}; const toggleButtonLabel = isOlderRepliesShown ? '' : 'more'; const shownReplies = replyList.slice(replyList.length - 2, replyList.length); const hiddenReplies = replyList.slice(0, replyList.length - 2); From 3f4938cb046eafeed81944a149928ad8ae372ce1 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 09:03:07 +0000 Subject: [PATCH 71/81] tidy up turbo.json --- apps/slackbot-proxy/turbo.json | 42 ++++++++++++++++++++++++++++++++++ turbo.json | 21 ----------------- 2 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 apps/slackbot-proxy/turbo.json diff --git a/apps/slackbot-proxy/turbo.json b/apps/slackbot-proxy/turbo.json new file mode 100644 index 00000000000..c5176227a14 --- /dev/null +++ b/apps/slackbot-proxy/turbo.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + + "clean": { + "dependsOn": ["@growi/slack#clean"], + "cache": false + }, + + "build": { + "dependsOn": ["@growi/slack#build"], + "outputs": ["dist/**"], + "outputLogs": "new-only" + }, + + "dev": { + "dependsOn": ["@growi/slack#dev"], + "cache": false, + "persistent": true + }, + "dev:ci": { + "dependsOn": ["@growi/slack#dev"], + "cache": false + }, + + "lint": { + "dependsOn": ["@growi/slack#dev"] + }, + + "test": { + "dependsOn": ["@growi/slack#dev"], + "outputLogs": "new-only" + }, + + "version": { + "cache": false, + "dependsOn": ["^version", "//#version"] + } + + } +} diff --git a/turbo.json b/turbo.json index 4956ab5f883..101507e751c 100644 --- a/turbo.json +++ b/turbo.json @@ -34,11 +34,6 @@ "outputs": ["dist/**"], "outputLogs": "new-only" }, - "@growi/slackbot-proxy#build": { - "dependsOn": ["@growi/slack#build"], - "outputs": ["dist/**"], - "outputLogs": "new-only" - }, "build": { "outputs": ["dist/**"], "inputs": [ @@ -66,15 +61,6 @@ "outputs": ["dist/**"], "outputLogs": "new-only" }, - "@growi/slackbot-proxy#dev": { - "dependsOn": ["@growi/slack#dev"], - "cache": false, - "persistent": true - }, - "@growi/slackbot-proxy#dev:ci": { - "dependsOn": ["@growi/slack#dev"], - "cache": false - }, "dev": { "outputs": ["dist/**"], "inputs": [ @@ -108,16 +94,9 @@ "@growi/ui#lint": { "dependsOn": ["@growi/core#dev"] }, - "@growi/slackbot-proxy#lint": { - "dependsOn": ["@growi/slack#dev"] - }, "lint": { }, - "@growi/slackbot-proxy#test": { - "dependsOn": ["@growi/slack#dev"], - "outputLogs": "new-only" - }, "@growi/preset-templates#test": { "dependsOn": ["@growi/pluginkit#dev"], "outputLogs": "new-only" From 09f3c8e6d3c1a954884b28dfa2c993152c197c96 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 09:05:28 +0000 Subject: [PATCH 72/81] fix import line for injection --- apps/slackbot-proxy/src/services/LinkSharedService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/slackbot-proxy/src/services/LinkSharedService.ts b/apps/slackbot-proxy/src/services/LinkSharedService.ts index f310b4f3f7a..b8f033ae906 100644 --- a/apps/slackbot-proxy/src/services/LinkSharedService.ts +++ b/apps/slackbot-proxy/src/services/LinkSharedService.ts @@ -3,7 +3,9 @@ import type { WebClient } from '@slack/web-api'; import { Inject, Service } from '@tsed/di'; import axios from 'axios'; -import type { RelationRepository } from '~/repositories/relation'; +// needed to import class (not type) for injection +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import { RelationRepository } from '~/repositories/relation'; import loggerFactory from '~/utils/logger'; const logger = loggerFactory('slackbot-proxy:services:LinkSharedService'); From ac321982fa7a13bc01a16d9f88ced74fb78800da Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 09:42:38 +0000 Subject: [PATCH 73/81] WIP: typescriptize --- ...wi-archive-import-option.js => growi-archive-import-option.ts} | 0 ...ort-option-for-revisions.js => import-option-for-revisions.ts} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename apps/app/src/models/admin/{growi-archive-import-option.js => growi-archive-import-option.ts} (100%) rename apps/app/src/models/admin/{import-option-for-revisions.js => import-option-for-revisions.ts} (100%) diff --git a/apps/app/src/models/admin/growi-archive-import-option.js b/apps/app/src/models/admin/growi-archive-import-option.ts similarity index 100% rename from apps/app/src/models/admin/growi-archive-import-option.js rename to apps/app/src/models/admin/growi-archive-import-option.ts diff --git a/apps/app/src/models/admin/import-option-for-revisions.js b/apps/app/src/models/admin/import-option-for-revisions.ts similarity index 100% rename from apps/app/src/models/admin/import-option-for-revisions.js rename to apps/app/src/models/admin/import-option-for-revisions.ts From 9c35d1be410fa7a49a7a2c46624eb04c7b6a1827 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 09:44:38 +0000 Subject: [PATCH 74/81] typescriptize --- .../src/models/admin/growi-archive-import-option.ts | 10 ++++++---- apps/app/src/models/admin/import-option-for-pages.ts | 6 +++--- .../src/models/admin/import-option-for-revisions.ts | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/app/src/models/admin/growi-archive-import-option.ts b/apps/app/src/models/admin/growi-archive-import-option.ts index 51acf03fb56..3638a1201d5 100644 --- a/apps/app/src/models/admin/growi-archive-import-option.ts +++ b/apps/app/src/models/admin/growi-archive-import-option.ts @@ -1,6 +1,10 @@ -class GrowiArchiveImportOption { +export class GrowiArchiveImportOption { - constructor(collectionName, mode, initProps = {}) { + collectionName: string; + + mode: string; + + constructor(collectionName: string, mode: string, initProps = {}) { this.collectionName = collectionName; this.mode = mode; @@ -10,5 +14,3 @@ class GrowiArchiveImportOption { } } - -module.exports = GrowiArchiveImportOption; diff --git a/apps/app/src/models/admin/import-option-for-pages.ts b/apps/app/src/models/admin/import-option-for-pages.ts index 122cbacb7f8..96b94daac76 100644 --- a/apps/app/src/models/admin/import-option-for-pages.ts +++ b/apps/app/src/models/admin/import-option-for-pages.ts @@ -1,4 +1,4 @@ -import GrowiArchiveImportOption from './growi-archive-import-option'; +import { GrowiArchiveImportOption } from './growi-archive-import-option'; const DEFAULT_PROPS = { isOverwriteAuthorWithCurrentUser: false, @@ -20,8 +20,8 @@ export class ImportOptionForPages extends GrowiArchiveImportOption { initPageMetadatas; - constructor(collectionName: string, mode: string, initProps) { - super(collectionName, mode, initProps || DEFAULT_PROPS); + constructor(collectionName: string, mode: string, initProps = DEFAULT_PROPS) { + super(collectionName, mode, initProps); } } diff --git a/apps/app/src/models/admin/import-option-for-revisions.ts b/apps/app/src/models/admin/import-option-for-revisions.ts index af571a80e84..a303cfb2a94 100644 --- a/apps/app/src/models/admin/import-option-for-revisions.ts +++ b/apps/app/src/models/admin/import-option-for-revisions.ts @@ -1,4 +1,4 @@ -const GrowiArchiveImportOption = require('./growi-archive-import-option'); +import { GrowiArchiveImportOption } from './growi-archive-import-option'; const DEFAULT_PROPS = { isOverwriteAuthorWithCurrentUser: false, @@ -6,8 +6,8 @@ const DEFAULT_PROPS = { export class ImportOptionForRevisions extends GrowiArchiveImportOption { - constructor(collectionName, mode, initProps) { - super(collectionName, mode, initProps || DEFAULT_PROPS); + constructor(collectionName: string, mode: string, initProps = DEFAULT_PROPS) { + super(collectionName, mode, initProps); } } From 2987db7aeab4863942ebefc7ba3e65bd1289b955 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 09:47:48 +0000 Subject: [PATCH 75/81] fix import lines and typings --- .../src/client/components/Admin/G2GDataTransferExportForm.tsx | 4 ++-- .../GrowiArchive/ImportCollectionConfigurationModal.jsx | 2 +- .../Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx | 2 +- .../components/Admin/ImportData/GrowiArchive/ImportForm.jsx | 3 ++- apps/app/src/server/service/g2g-transfer.ts | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx index ae5eb01bff6..c9e6917fed7 100644 --- a/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx +++ b/apps/app/src/client/components/Admin/G2GDataTransferExportForm.tsx @@ -4,7 +4,7 @@ import React, { import { useTranslation } from 'next-i18next'; -import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; import { ImportOptionForPages } from '~/models/admin/import-option-for-pages'; import { ImportOptionForRevisions } from '~/models/admin/import-option-for-revisions'; @@ -22,7 +22,7 @@ const GROUPS_CONFIG = [ ]; const ALL_GROUPED_COLLECTIONS = GROUPS_PAGE.concat(GROUPS_USER).concat(GROUPS_CONFIG); -const IMPORT_OPTION_CLASS_MAPPING = { +const IMPORT_OPTION_CLASS_MAPPING: Record = { pages: ImportOptionForPages, revisions: ImportOptionForRevisions, }; diff --git a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx index b45404c3591..dc28c4c8d83 100644 --- a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx +++ b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx @@ -11,7 +11,7 @@ import { ModalFooter, } from 'reactstrap'; -import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; // import { toastSuccess, toastError } from '~/client/util/toastr'; diff --git a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx index 23fa83b88ec..49864f2be78 100644 --- a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx +++ b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Progress } from 'reactstrap'; -import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; const MODE_ATTR_MAP = { diff --git a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportForm.jsx b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportForm.jsx index 7de5d1e62d1..311f95d84ca 100644 --- a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportForm.jsx +++ b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/ImportForm.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import { apiv3Post } from '~/client/util/apiv3-client'; import { toastSuccess, toastError } from '~/client/util/toastr'; -import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; import { ImportOptionForPages } from '~/models/admin/import-option-for-pages'; import { ImportOptionForRevisions } from '~/models/admin/import-option-for-revisions'; import { useAdminSocket } from '~/stores/socket-io'; @@ -27,6 +27,7 @@ const GROUPS_CONFIG = [ ]; const ALL_GROUPED_COLLECTIONS = GROUPS_PAGE.concat(GROUPS_USER).concat(GROUPS_CONFIG); +/** @type Record */ const IMPORT_OPTION_CLASS_MAPPING = { pages: ImportOptionForPages, revisions: ImportOptionForRevisions, diff --git a/apps/app/src/server/service/g2g-transfer.ts b/apps/app/src/server/service/g2g-transfer.ts index c56282172e5..d213d6ecbfc 100644 --- a/apps/app/src/server/service/g2g-transfer.ts +++ b/apps/app/src/server/service/g2g-transfer.ts @@ -10,7 +10,7 @@ import FormData from 'form-data'; import mongoose, { Types as MongooseTypes } from 'mongoose'; import { G2G_PROGRESS_STATUS } from '~/interfaces/g2g-transfer'; -import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; import TransferKeyModel from '~/server/models/transfer-key'; import { getImportService, ImportMode, type ImportSettings } from '~/server/service/import'; import { createBatchStream } from '~/server/util/batch-stream'; From 08733a1c042b45f5752a5152e18c4549aae2bb94 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 10:13:22 +0000 Subject: [PATCH 76/81] fix typings --- apps/app/src/server/routes/apiv3/import.js | 2 +- apps/app/src/server/service/import/overwrite-params/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/server/routes/apiv3/import.js b/apps/app/src/server/routes/apiv3/import.js index 171fbdc6844..4b952207a2c 100644 --- a/apps/app/src/server/routes/apiv3/import.js +++ b/apps/app/src/server/routes/apiv3/import.js @@ -268,7 +268,7 @@ export default function route(crowi) { const importSettingsMap = {}; fileStatsToImport.forEach(({ fileName, collectionName }) => { // instanciate GrowiArchiveImportOption - /** @type {GrowiArchiveImportOption} */ + /** @type {import('~/models/admin/growi-archive-import-option').GrowiArchiveImportOption} */ const option = options.find(opt => opt.collectionName === collectionName); // generate options diff --git a/apps/app/src/server/service/import/overwrite-params/index.ts b/apps/app/src/server/service/import/overwrite-params/index.ts index e62b0fe4fbf..35b98eb78ef 100644 --- a/apps/app/src/server/service/import/overwrite-params/index.ts +++ b/apps/app/src/server/service/import/overwrite-params/index.ts @@ -1,4 +1,4 @@ -import type GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option'; +import type { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; import { isImportOptionForPages } from '~/models/admin/import-option-for-pages'; import type { OverwriteParams } from '../import-settings'; From 334c1299c17433b8d1a614dc1855bbd6e6cf3284 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 10:27:30 +0000 Subject: [PATCH 77/81] add the first argument --- apps/app/src/server/service/g2g-transfer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/server/service/g2g-transfer.ts b/apps/app/src/server/service/g2g-transfer.ts index d213d6ecbfc..25cda521f9e 100644 --- a/apps/app/src/server/service/g2g-transfer.ts +++ b/apps/app/src/server/service/g2g-transfer.ts @@ -609,7 +609,7 @@ export class G2GTransferReceiverService implements Receiver { ): { [key: string]: ImportSettings; } { const importSettingsMap = {}; innerFileStats.forEach(({ fileName, collectionName }) => { - const options = new GrowiArchiveImportOption(null, optionsMap[collectionName]); + const options = new GrowiArchiveImportOption(collectionName, null, optionsMap[collectionName]); if (collectionName === 'configs' && options.mode !== ImportMode.flushAndInsert) { throw new Error('`flushAndInsert` is only available as an import setting for configs collection'); From 7b4735b87deb0e0ad3ecedca51437d9a0f151aec Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 11:40:48 +0000 Subject: [PATCH 78/81] make the code more type safe --- .../src/models/admin/growi-archive-import-option.ts | 6 ++++-- apps/app/src/models/admin/import-option-for-pages.ts | 4 +++- .../src/models/admin/import-option-for-revisions.ts | 4 +++- apps/app/src/server/service/g2g-transfer.ts | 2 +- apps/app/src/server/service/import/import.ts | 10 ++++------ 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/app/src/models/admin/growi-archive-import-option.ts b/apps/app/src/models/admin/growi-archive-import-option.ts index 3638a1201d5..861f54224dd 100644 --- a/apps/app/src/models/admin/growi-archive-import-option.ts +++ b/apps/app/src/models/admin/growi-archive-import-option.ts @@ -1,10 +1,12 @@ +import { ImportMode } from '~/server/service/import'; + export class GrowiArchiveImportOption { collectionName: string; - mode: string; + mode: ImportMode; - constructor(collectionName: string, mode: string, initProps = {}) { + constructor(collectionName: string, mode: ImportMode = ImportMode.insert, initProps = {}) { this.collectionName = collectionName; this.mode = mode; diff --git a/apps/app/src/models/admin/import-option-for-pages.ts b/apps/app/src/models/admin/import-option-for-pages.ts index 96b94daac76..d88549cd2f1 100644 --- a/apps/app/src/models/admin/import-option-for-pages.ts +++ b/apps/app/src/models/admin/import-option-for-pages.ts @@ -1,3 +1,5 @@ +import { ImportMode } from '~/server/service/import'; + import { GrowiArchiveImportOption } from './growi-archive-import-option'; const DEFAULT_PROPS = { @@ -20,7 +22,7 @@ export class ImportOptionForPages extends GrowiArchiveImportOption { initPageMetadatas; - constructor(collectionName: string, mode: string, initProps = DEFAULT_PROPS) { + constructor(collectionName: string, mode: ImportMode = ImportMode.insert, initProps = DEFAULT_PROPS) { super(collectionName, mode, initProps); } diff --git a/apps/app/src/models/admin/import-option-for-revisions.ts b/apps/app/src/models/admin/import-option-for-revisions.ts index a303cfb2a94..44cd92960b9 100644 --- a/apps/app/src/models/admin/import-option-for-revisions.ts +++ b/apps/app/src/models/admin/import-option-for-revisions.ts @@ -1,3 +1,5 @@ +import { ImportMode } from '~/server/service/import'; + import { GrowiArchiveImportOption } from './growi-archive-import-option'; const DEFAULT_PROPS = { @@ -6,7 +8,7 @@ const DEFAULT_PROPS = { export class ImportOptionForRevisions extends GrowiArchiveImportOption { - constructor(collectionName: string, mode: string, initProps = DEFAULT_PROPS) { + constructor(collectionName: string, mode: ImportMode = ImportMode.insert, initProps = DEFAULT_PROPS) { super(collectionName, mode, initProps); } diff --git a/apps/app/src/server/service/g2g-transfer.ts b/apps/app/src/server/service/g2g-transfer.ts index 25cda521f9e..dbc8432d640 100644 --- a/apps/app/src/server/service/g2g-transfer.ts +++ b/apps/app/src/server/service/g2g-transfer.ts @@ -609,7 +609,7 @@ export class G2GTransferReceiverService implements Receiver { ): { [key: string]: ImportSettings; } { const importSettingsMap = {}; innerFileStats.forEach(({ fileName, collectionName }) => { - const options = new GrowiArchiveImportOption(collectionName, null, optionsMap[collectionName]); + const options = new GrowiArchiveImportOption(collectionName, undefined, optionsMap[collectionName]); if (collectionName === 'configs' && options.mode !== ImportMode.flushAndInsert) { throw new Error('`flushAndInsert` is only available as an import setting for configs collection'); diff --git a/apps/app/src/server/service/import/import.ts b/apps/app/src/server/service/import/import.ts index e885b3c9346..992ea5d9fd8 100644 --- a/apps/app/src/server/service/import/import.ts +++ b/apps/app/src/server/service/import/import.ts @@ -303,14 +303,12 @@ export class ImportService { /** * process bulk operation - * @param {object} bulk MongoDB Bulk instance - * @param {string} collectionName collection name - * @param {object} document - * @param {ImportSettings} importSettings + * @param bulk MongoDB Bulk instance + * @param collectionName collection name */ - bulkOperate(bulk, collectionName, document, importSettings) { + bulkOperate(bulk, collectionName: string, document, importSettings: ImportSettings) { // insert - if (importSettings.mode !== 'upsert') { + if (importSettings.mode !== ImportMode.upsert) { return bulk.insert(document); } From 0fec7644275bb6671327931fbd72f2625b6b4383 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 11:42:19 +0000 Subject: [PATCH 79/81] make the code more type safe --- apps/app/src/server/service/g2g-transfer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/server/service/g2g-transfer.ts b/apps/app/src/server/service/g2g-transfer.ts index dbc8432d640..88971910907 100644 --- a/apps/app/src/server/service/g2g-transfer.ts +++ b/apps/app/src/server/service/g2g-transfer.ts @@ -614,7 +614,7 @@ export class G2GTransferReceiverService implements Receiver { if (collectionName === 'configs' && options.mode !== ImportMode.flushAndInsert) { throw new Error('`flushAndInsert` is only available as an import setting for configs collection'); } - if (collectionName === 'pages' && options.mode === 'insert') { + if (collectionName === 'pages' && options.mode === ImportMode.insert) { throw new Error('`insert` is not available as an import setting for pages collection'); } if (collectionName === 'attachmentFiles.chunks') { From e573ffb82d88cb711a25ac897a4e8644f99b9341 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 11:58:41 +0000 Subject: [PATCH 80/81] make ImportMode const universal --- apps/app/src/models/admin/growi-archive-import-option.ts | 2 +- .../src/{server/service/import => models/admin}/import-mode.ts | 0 apps/app/src/models/admin/import-option-for-pages.ts | 2 +- apps/app/src/models/admin/import-option-for-revisions.ts | 2 +- apps/app/src/server/service/g2g-transfer.ts | 3 ++- apps/app/src/server/service/import/import-settings.ts | 3 ++- apps/app/src/server/service/import/import.ts | 2 +- apps/app/src/server/service/import/index.ts | 2 -- 8 files changed, 8 insertions(+), 8 deletions(-) rename apps/app/src/{server/service/import => models/admin}/import-mode.ts (100%) diff --git a/apps/app/src/models/admin/growi-archive-import-option.ts b/apps/app/src/models/admin/growi-archive-import-option.ts index 861f54224dd..c78199b2ce3 100644 --- a/apps/app/src/models/admin/growi-archive-import-option.ts +++ b/apps/app/src/models/admin/growi-archive-import-option.ts @@ -1,4 +1,4 @@ -import { ImportMode } from '~/server/service/import'; +import { ImportMode } from './import-mode'; export class GrowiArchiveImportOption { diff --git a/apps/app/src/server/service/import/import-mode.ts b/apps/app/src/models/admin/import-mode.ts similarity index 100% rename from apps/app/src/server/service/import/import-mode.ts rename to apps/app/src/models/admin/import-mode.ts diff --git a/apps/app/src/models/admin/import-option-for-pages.ts b/apps/app/src/models/admin/import-option-for-pages.ts index d88549cd2f1..646fab52d43 100644 --- a/apps/app/src/models/admin/import-option-for-pages.ts +++ b/apps/app/src/models/admin/import-option-for-pages.ts @@ -1,4 +1,4 @@ -import { ImportMode } from '~/server/service/import'; +import { ImportMode } from '~/models/admin/import-mode'; import { GrowiArchiveImportOption } from './growi-archive-import-option'; diff --git a/apps/app/src/models/admin/import-option-for-revisions.ts b/apps/app/src/models/admin/import-option-for-revisions.ts index 44cd92960b9..645defb9224 100644 --- a/apps/app/src/models/admin/import-option-for-revisions.ts +++ b/apps/app/src/models/admin/import-option-for-revisions.ts @@ -1,4 +1,4 @@ -import { ImportMode } from '~/server/service/import'; +import { ImportMode } from '~/models/admin/import-mode'; import { GrowiArchiveImportOption } from './growi-archive-import-option'; diff --git a/apps/app/src/server/service/g2g-transfer.ts b/apps/app/src/server/service/g2g-transfer.ts index 88971910907..89466a708e4 100644 --- a/apps/app/src/server/service/g2g-transfer.ts +++ b/apps/app/src/server/service/g2g-transfer.ts @@ -11,8 +11,9 @@ import mongoose, { Types as MongooseTypes } from 'mongoose'; import { G2G_PROGRESS_STATUS } from '~/interfaces/g2g-transfer'; import { GrowiArchiveImportOption } from '~/models/admin/growi-archive-import-option'; +import { ImportMode } from '~/models/admin/import-mode'; import TransferKeyModel from '~/server/models/transfer-key'; -import { getImportService, ImportMode, type ImportSettings } from '~/server/service/import'; +import { getImportService, type ImportSettings } from '~/server/service/import'; import { createBatchStream } from '~/server/util/batch-stream'; import axios from '~/utils/axios'; import loggerFactory from '~/utils/logger'; diff --git a/apps/app/src/server/service/import/import-settings.ts b/apps/app/src/server/service/import/import-settings.ts index 77bb6d9c2e1..423ba4f96dc 100644 --- a/apps/app/src/server/service/import/import-settings.ts +++ b/apps/app/src/server/service/import/import-settings.ts @@ -1,4 +1,5 @@ -import type { ImportMode } from './import-mode'; +import type { ImportMode } from '~/models/admin/import-mode'; + import type { OverwriteFunction } from './overwrite-function'; export type OverwriteParams = { [propertyName: string]: OverwriteFunction | unknown } diff --git a/apps/app/src/server/service/import/import.ts b/apps/app/src/server/service/import/import.ts index 992ea5d9fd8..00875ce013f 100644 --- a/apps/app/src/server/service/import/import.ts +++ b/apps/app/src/server/service/import/import.ts @@ -13,6 +13,7 @@ import mongoose from 'mongoose'; import streamToPromise from 'stream-to-promise'; import unzipStream from 'unzip-stream'; +import { ImportMode } from '~/models/admin/import-mode'; import type Crowi from '~/server/crowi'; import { setupIndependentModels } from '~/server/crowi/setup-models'; import type CollectionProgress from '~/server/models/vo/collection-progress'; @@ -25,7 +26,6 @@ import { configManager } from '../config-manager'; import type { ConvertMap } from './construct-convert-map'; import { constructConvertMap } from './construct-convert-map'; import { getModelFromCollectionName } from './get-model-from-collection-name'; -import { ImportMode } from './import-mode'; import type { ImportSettings, OverwriteParams } from './import-settings'; import { keepOriginal } from './overwrite-function'; diff --git a/apps/app/src/server/service/import/index.ts b/apps/app/src/server/service/import/index.ts index 7e7021c733a..14d075d42cf 100644 --- a/apps/app/src/server/service/import/index.ts +++ b/apps/app/src/server/service/import/index.ts @@ -18,6 +18,4 @@ export const getImportService = (): ImportService => { return instance; }; - -export * from './import-mode'; export * from './import-settings'; From 555a80324c9455cbea1d31c6c7d0216b5a26acad Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Mon, 9 Sep 2024 12:25:08 +0000 Subject: [PATCH 81/81] update mergify.yml --- .github/mergify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 600006e95c8..ec9c30df50b 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -3,7 +3,6 @@ queue_rules: allow_inplace_checks: false queue_conditions: - '#check-failure = 0' - - check-success = "check-title" - or: - and: - check-success ~= ci-slackbot-proxy- @@ -23,6 +22,7 @@ pull_request_rules: conditions: - '#approved-reviews-by >= 1' - '#review-requested = 0' + - check-success = "check-title" actions: queue: