From 69b2c5f2647fcd2b8a9e6d595f81a47ddcd9ca2e Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Tue, 11 May 2021 10:35:07 +0200 Subject: [PATCH 01/28] [#1750] Fix tags filter (#1765) --- frontend/ui/src/actions/conversations/index.ts | 13 +++++++++---- .../ui/src/actions/conversationsFilter/index.ts | 6 ++++-- .../ui/src/pages/Inbox/ConversationList/index.tsx | 7 +------ frontend/ui/src/pages/Tags/index.tsx | 5 ++++- .../ui/src/reducers/data/conversations/index.ts | 2 +- .../httpclient/src/endpoints/getConfig.ts | 5 +---- .../httpclient/src/endpoints/listConversations.ts | 2 +- .../httpclient/src/endpoints/listMessages.ts | 2 +- 8 files changed, 22 insertions(+), 20 deletions(-) diff --git a/frontend/ui/src/actions/conversations/index.ts b/frontend/ui/src/actions/conversations/index.ts index 11cd89de3e..53cb2854d1 100644 --- a/frontend/ui/src/actions/conversations/index.ts +++ b/frontend/ui/src/actions/conversations/index.ts @@ -20,7 +20,10 @@ export const loadingConversationAction = createAction( (conversationId: string) => conversationId )(); -export const loadingConversationsAction = createAction(CONVERSATIONS_LOADING)(); +export const loadingConversationsAction = createAction( + CONVERSATIONS_LOADING, + (isLoading: boolean) => isLoading +)(); export const mergeConversationsAction = createAction( CONVERSATIONS_MERGE, @@ -55,9 +58,10 @@ export const setStateConversationAction = createAction( )<{conversationId: string; state: string}>(); export const listConversations = () => async (dispatch: Dispatch) => { - dispatch(loadingConversationsAction()); - return HttpClientInstance.listConversations({page_size: 10}).then((response: PaginatedResponse) => { + dispatch(loadingConversationsAction(true)); + return HttpClientInstance.listConversations({page_size: 50}).then((response: PaginatedResponse) => { dispatch(mergeConversationsAction(response.data, response.paginationData)); + dispatch(loadingConversationsAction(false)); return Promise.resolve(true); }); }; @@ -65,9 +69,10 @@ export const listConversations = () => async (dispatch: Dispatch) => { export const listNextConversations = () => async (dispatch: Dispatch, state: () => StateModel) => { const cursor = state().data.conversations.all.paginationData.nextCursor; - dispatch(loadingConversationsAction()); + dispatch(loadingConversationsAction(true)); return HttpClientInstance.listConversations({cursor: cursor}).then((response: PaginatedResponse) => { dispatch(mergeConversationsAction(response.data, response.paginationData)); + dispatch(loadingConversationsAction(false)); return Promise.resolve(true); }); }; diff --git a/frontend/ui/src/actions/conversationsFilter/index.ts b/frontend/ui/src/actions/conversationsFilter/index.ts index 29a7688ecd..510388b555 100644 --- a/frontend/ui/src/actions/conversationsFilter/index.ts +++ b/frontend/ui/src/actions/conversationsFilter/index.ts @@ -65,13 +65,13 @@ const executeFilter = (filter: ConversationFilter, dispatch: Dispatch, stat }; const refetchConversations = (dispatch: Dispatch, state: () => StateModel, cursor?: string) => { - dispatch(loadingConversationsAction()); + dispatch(loadingConversationsAction(true)); const filter = state().data.conversations.filtered.currentFilter; if (Object.keys(filter).length > 0) { delay(() => { if (isEqual(filter, state().data.conversations.filtered.currentFilter)) { return HttpClientInstance.listConversations({ - page_size: 10, + page_size: 50, cursor, filters: filterToLuceneSyntax(filter), }).then((response: PaginatedResponse) => { @@ -85,9 +85,11 @@ const refetchConversations = (dispatch: Dispatch, state: () => StateModel, } }); } + dispatch(loadingConversationsAction(false)); }, 100); } else { dispatch(resetFilteredConversationAction()); + dispatch(loadingConversationsAction(false)); } }; diff --git a/frontend/ui/src/pages/Inbox/ConversationList/index.tsx b/frontend/ui/src/pages/Inbox/ConversationList/index.tsx index f17f6e49d0..ed515da3dd 100644 --- a/frontend/ui/src/pages/Inbox/ConversationList/index.tsx +++ b/frontend/ui/src/pages/Inbox/ConversationList/index.tsx @@ -12,7 +12,6 @@ import ConversationListHeader from '../ConversationListHeader'; import ConversationsFilter from '../ConversationsFilter'; import ConversationListItem from '../ConversationListItem'; import NoConversations from '../NoConversations'; -import {SimpleLoader} from 'components'; import {MergedConversation, StateModel} from '../../../reducers'; @@ -44,11 +43,7 @@ const ConversationList = (props: ConversationListProps) => { const renderConversationItem = (conversation: MergedConversation, style: React.CSSProperties) => { const {currentConversationId} = props; if (conversation == null) { - return ( -
- -
- ); + return
; } return ( , typeof initialSta } handleSearch = (query: string) => { - this.setState({query, filteredTags: this.props.tags.filter(t => t.name.match(query))}); + this.setState({ + query, + filteredTags: this.props.tags.filter(t => t.name.toLowerCase().match(query.toLocaleLowerCase())), + }); }; handleDelete = (e: React.ChangeEvent) => { diff --git a/frontend/ui/src/reducers/data/conversations/index.ts b/frontend/ui/src/reducers/data/conversations/index.ts index cb167a6003..dd50993899 100644 --- a/frontend/ui/src/reducers/data/conversations/index.ts +++ b/frontend/ui/src/reducers/data/conversations/index.ts @@ -254,7 +254,7 @@ function allReducer( ...state, paginationData: { ...state.paginationData, - loading: true, + loading: action.payload, }, }; diff --git a/lib/typescript/httpclient/src/endpoints/getConfig.ts b/lib/typescript/httpclient/src/endpoints/getConfig.ts index 0062d8642a..94f00f51bb 100644 --- a/lib/typescript/httpclient/src/endpoints/getConfig.ts +++ b/lib/typescript/httpclient/src/endpoints/getConfig.ts @@ -1,7 +1,4 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const camelcaseKeys = require('camelcase-keys'); - export const getConfigDef = { endpoint: 'client.config', - mapResponse: response => camelcaseKeys(response, {deep: true}), + mapResponse: response => response, }; diff --git a/lib/typescript/httpclient/src/endpoints/listConversations.ts b/lib/typescript/httpclient/src/endpoints/listConversations.ts index bba8413d7a..10c104dcd5 100644 --- a/lib/typescript/httpclient/src/endpoints/listConversations.ts +++ b/lib/typescript/httpclient/src/endpoints/listConversations.ts @@ -6,7 +6,7 @@ import {mapMessage} from 'model'; export const listConversationsDef = { endpoint: () => 'conversations.list', mapRequest: (conversationListRequest: ListConversationsRequestPayload) => { - conversationListRequest.page_size = conversationListRequest.page_size ?? 10; + conversationListRequest.page_size = conversationListRequest.page_size ?? 50; conversationListRequest.cursor = conversationListRequest.cursor ?? null; return conversationListRequest; }, diff --git a/lib/typescript/httpclient/src/endpoints/listMessages.ts b/lib/typescript/httpclient/src/endpoints/listMessages.ts index 3e4990d277..20f029c50e 100644 --- a/lib/typescript/httpclient/src/endpoints/listMessages.ts +++ b/lib/typescript/httpclient/src/endpoints/listMessages.ts @@ -6,7 +6,7 @@ const camelcaseKeys = require('camelcase-keys'); export const listMessagesDef = { endpoint: 'messages.list', mapRequest: conversationListRequest => { - conversationListRequest.pageSize = conversationListRequest.pageSize ?? 10; + conversationListRequest.pageSize = conversationListRequest.pageSize ?? 50; conversationListRequest.cursor = conversationListRequest.cursor ?? null; return { conversation_id: conversationListRequest.conversationId, From 27bc5a73bff7bbb9d0dead3e320966d20c252d53 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Tue, 11 May 2021 11:16:56 +0200 Subject: [PATCH 02/28] [#1749] Fixed activeFilterCount (#1747) --- .../src/actions/conversationsFilter/index.ts | 17 +--- .../pages/Inbox/ConversationList/index.tsx | 4 +- .../ConversationListHeader/index.module.scss | 22 ++++- .../Inbox/ConversationListHeader/index.tsx | 18 +---- .../pages/Inbox/ConversationsFilter/index.tsx | 80 ------------------ .../Popup.module.scss | 0 .../Popup.tsx | 66 ++++++++------- .../index.module.scss | 0 .../ui/src/pages/Inbox/QuickFilter/index.tsx | 81 +++++++++++++++++++ 9 files changed, 146 insertions(+), 142 deletions(-) delete mode 100644 frontend/ui/src/pages/Inbox/ConversationsFilter/index.tsx rename frontend/ui/src/pages/Inbox/{ConversationsFilter => QuickFilter}/Popup.module.scss (100%) rename frontend/ui/src/pages/Inbox/{ConversationsFilter => QuickFilter}/Popup.tsx (85%) rename frontend/ui/src/pages/Inbox/{ConversationsFilter => QuickFilter}/index.module.scss (100%) create mode 100644 frontend/ui/src/pages/Inbox/QuickFilter/index.tsx diff --git a/frontend/ui/src/actions/conversationsFilter/index.ts b/frontend/ui/src/actions/conversationsFilter/index.ts index 510388b555..80da4a8adf 100644 --- a/frontend/ui/src/actions/conversationsFilter/index.ts +++ b/frontend/ui/src/actions/conversationsFilter/index.ts @@ -6,7 +6,7 @@ import {HttpClientInstance} from '../../InitializeAiryApi'; import {StateModel} from '../../reducers'; import {loadingConversationsAction} from '../conversations'; -import {delay, isEqual} from 'lodash-es'; +import {delay, isEqual, omit} from 'lodash-es'; export const RESET_FILTERED_CONVERSATIONS = '@@conversations/RESET_FILTEREDS'; export const SET_FILTERED_CONVERSATIONS = '@@conversations/SET_FILTERED'; @@ -38,10 +38,8 @@ export const updateFilteredConversationsAction = createAction( )<{filter: ConversationFilter}>(); export const setSearch = (currentFilter: ConversationFilter, displayName: string) => { - return setFilter({ - ...currentFilter, - displayName, - }); + const newFilter = omit({...currentFilter}, 'displayName'); + return displayName && displayName.length > 0 ? setFilter({...newFilter, displayName}) : setFilter(newFilter); }; export const setFilter = (filter: ConversationFilter) => { @@ -50,15 +48,6 @@ export const setFilter = (filter: ConversationFilter) => { }; }; -export const resetFilter = () => { - return function (dispatch: Dispatch, state: () => StateModel) { - dispatch(resetFilteredConversationAction()); - const currentFilter = state().data.conversations.filtered.currentFilter; - const newFilter: ConversationFilter = {displayName: currentFilter.displayName}; - executeFilter(newFilter, dispatch, state); - }; -}; - const executeFilter = (filter: ConversationFilter, dispatch: Dispatch, state: () => StateModel) => { dispatch(updateFilteredConversationsAction(filter)); refetchConversations(dispatch, state); diff --git a/frontend/ui/src/pages/Inbox/ConversationList/index.tsx b/frontend/ui/src/pages/Inbox/ConversationList/index.tsx index ed515da3dd..77d07b188c 100644 --- a/frontend/ui/src/pages/Inbox/ConversationList/index.tsx +++ b/frontend/ui/src/pages/Inbox/ConversationList/index.tsx @@ -9,7 +9,7 @@ import {newestConversationFirst, newestFilteredConversationFirst} from '../../.. import {listNextConversations} from '../../../actions/conversations'; import ConversationListHeader from '../ConversationListHeader'; -import ConversationsFilter from '../ConversationsFilter'; +import QuickFilter from '../QuickFilter'; import ConversationListItem from '../ConversationListItem'; import NoConversations from '../NoConversations'; @@ -113,7 +113,7 @@ const ConversationList = (props: ConversationListProps) => {
resizeList()} /> - +
{renderConversationList()}
diff --git a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss index dff4a0cf1f..21564f503a 100644 --- a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss +++ b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss @@ -67,6 +67,13 @@ background-color: white; cursor: pointer; outline: none; + &:hover { + svg { + path { + fill: var(--color-airy-blue); + } + } + } } .headline { @@ -92,13 +99,26 @@ background: none; border: none; outline: none; + padding: 0px; + &:hover { + svg { + path { + fill: var(--color-airy-blue); + } + } + } } .activeFilters { @extend .filterButton; + background: var(--color-airy-logo-blue); + height: 24px; + width: 24px; + padding: 0px; + border-radius: 50%; svg { path { - fill: var(--color-airy-blue); + fill: var(--color-background-blue); } } } diff --git a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.tsx b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.tsx index fa7899678d..e83e6e9fc0 100644 --- a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.tsx +++ b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.tsx @@ -14,7 +14,7 @@ import {ReactComponent as FilterIcon} from 'assets/images/icons/filter-alt.svg'; import styles from './index.module.scss'; import {cySearchButton, cySearchField, cySearchFieldBackButton} from 'handles'; -import Popup from '../ConversationsFilter/Popup'; +import Popup from '../QuickFilter/Popup'; const mapDispatchToProps = { setSearch, @@ -22,7 +22,6 @@ const mapDispatchToProps = { }; const mapStateToProps = (state: StateModel) => ({ - user: state.data.user, currentFilter: state.data.conversations.filtered.currentFilter || {}, totalConversations: state.data.conversations.all.paginationData.total, filteredPaginationData: state.data.conversations.filtered.paginationData, @@ -81,16 +80,7 @@ const ConversationListHeader = (props: ConversationListHeaderProps) => { onFilterVisibilityChanged(); }; - const activeFilter = () => { - const currentFilterLength = Object.keys(currentFilter).length; - - if (currentFilter.isStateOpen === undefined && currentFilter.displayName === (null || undefined)) { - return currentFilterLength - 2; - } - if (currentFilter.isStateOpen === undefined || currentFilter.displayName === (null || undefined)) { - return currentFilterLength - 1; - } - }; + const isFilterActive = (): boolean => Object.values(currentFilter).length > 0; const renderSearchInput = isShowingSearchInput ? (
@@ -118,8 +108,8 @@ const ConversationListHeader = (props: ConversationListHeaderProps) => { {isFilterOpen && ( diff --git a/frontend/ui/src/pages/Inbox/ConversationsFilter/index.tsx b/frontend/ui/src/pages/Inbox/ConversationsFilter/index.tsx deleted file mode 100644 index 7d2eb79871..0000000000 --- a/frontend/ui/src/pages/Inbox/ConversationsFilter/index.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import React, {useEffect, useRef} from 'react'; -import _, {connect, ConnectedProps} from 'react-redux'; -import {ConversationFilter} from 'model'; - -import {StateModel} from '../../../reducers'; - -import {setFilter} from '../../../actions/conversationsFilter'; -import {allConversations, isFilterActive} from '../../../selectors/conversations'; - -import styles from './index.module.scss'; - -const mapStateToProps = (state: StateModel) => { - return { - conversationsFilter: state.data.conversations.filtered.currentFilter, - isFilterActive: isFilterActive(state), - conversations: allConversations(state), - }; -}; - -const mapDispatchToProps = { - setFilter, -}; - -const connector = connect(mapStateToProps, mapDispatchToProps); - -type ConversationsFilterProps = {} & ConnectedProps; - -const ConversationsFilter = (props: ConversationsFilterProps) => { - const {conversationsFilter, setFilter} = props; - const allButton = useRef(null); - const openButton = useRef(null); - const closedButton = useRef(null); - - useEffect(() => { - currentStateFilter(); - }), - [props.conversations]; - - const currentStateFilter = () => { - allButton.current.className = styles.quickFilterButton; - openButton.current.className = styles.quickFilterButton; - closedButton.current.className = styles.quickFilterButton; - - if (conversationsFilter.isStateOpen === undefined) { - allButton.current.className = styles.quickFilterButtonActive; - } else if (conversationsFilter.isStateOpen === true) { - openButton.current.className = styles.quickFilterButtonActive; - } else if (conversationsFilter.isStateOpen === false) { - closedButton.current.className = styles.quickFilterButtonActive; - } - }; - - const setStateOpen = (setOpen: boolean) => { - const newFilter: ConversationFilter = {...conversationsFilter}; - newFilter.isStateOpen = setOpen; - setFilter(newFilter); - }; - - return ( -
-
-
-
- - - -
-
-
-
- ); -}; - -export default connector(ConversationsFilter); diff --git a/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.module.scss b/frontend/ui/src/pages/Inbox/QuickFilter/Popup.module.scss similarity index 100% rename from frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.module.scss rename to frontend/ui/src/pages/Inbox/QuickFilter/Popup.module.scss diff --git a/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx b/frontend/ui/src/pages/Inbox/QuickFilter/Popup.tsx similarity index 85% rename from frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx rename to frontend/ui/src/pages/Inbox/QuickFilter/Popup.tsx index 77f2ad412b..3d53df1d46 100644 --- a/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx +++ b/frontend/ui/src/pages/Inbox/QuickFilter/Popup.tsx @@ -1,10 +1,10 @@ import React, {useEffect, useState} from 'react'; import _, {connect, ConnectedProps} from 'react-redux'; -import {sortBy} from 'lodash-es'; +import {omit, sortBy} from 'lodash-es'; import {SearchField, LinkButton, Button} from 'components'; import {Tag as TagModel, Channel, ConversationFilter} from 'model'; import {listTags} from '../../../actions/tags'; -import {setFilter, resetFilter} from '../../../actions/conversationsFilter'; +import {setFilter} from '../../../actions/conversationsFilter'; import {StateModel} from '../../../reducers'; import DialogCustomizable from '../../../components/DialogCustomizable'; import Tag from '../../../components/Tag'; @@ -25,7 +25,6 @@ function mapStateToProps(state: StateModel) { const mapDispatchToProps = { setFilter, - resetFilter, listTags, }; @@ -36,7 +35,7 @@ type PopUpFilterProps = { } & ConnectedProps; const PopUpFilter = (props: PopUpFilterProps) => { - const {filter, channels, tags, listTags, closeCallback, setFilter, resetFilter} = props; + const {filter, channels, tags, listTags, closeCallback, setFilter} = props; const [pageSearch, setPageSearch] = useState(''); const [tagSearch, setTagSearch] = useState(''); @@ -45,17 +44,13 @@ const PopUpFilter = (props: PopUpFilterProps) => { listTags(); }, [listTags]); - const applyPressed = () => { - closeCallback(); - }; - - const resetPressed = e => { + const resetPressed = (e: React.MouseEvent) => { e.stopPropagation(); - resetFilter(); + setFilter({}); closeCallback(); }; - const toggleReadOnly = e => { + const toggleReadOnly = (e: React.MouseEvent) => { e.stopPropagation(); const newFilter: ConversationFilter = {...filter}; newFilter.readOnly = !filter.readOnly; @@ -63,7 +58,7 @@ const PopUpFilter = (props: PopUpFilterProps) => { setFilter(newFilter); }; - const toggleUnreadOnly = e => { + const toggleUnreadOnly = (e: React.MouseEvent) => { e.stopPropagation(); const newFilter: ConversationFilter = {...filter}; newFilter.unreadOnly = !filter.unreadOnly; @@ -71,8 +66,8 @@ const PopUpFilter = (props: PopUpFilterProps) => { setFilter(newFilter); }; - const toggleState = (event: React.MouseEvent, isOpen: boolean) => { - event.stopPropagation(); + const setState = (e: React.MouseEvent, isOpen: boolean) => { + e.stopPropagation(); const newFilter: ConversationFilter = {...filter}; newFilter.isStateOpen === isOpen ? (newFilter.isStateOpen = !isOpen) : (newFilter.isStateOpen = isOpen); setFilter(newFilter); @@ -82,27 +77,36 @@ const PopUpFilter = (props: PopUpFilterProps) => { return (channelsList || []).includes(channel.id); }; - const toggleChannel = (e, channel: Channel) => { + const toggleChannel = (e: React.MouseEvent, channel: Channel) => { e.stopPropagation(); const channels = filter.byChannels ? [...filter.byChannels] : []; isChannelSelected(channels, channel) ? channels.splice(channels.indexOf(channel.id), 1) : channels.push(channel.id); - setFilter({ - ...filter, - byChannels: channels, - }); + + if (channels.length > 0) { + setFilter({ + ...filter, + byChannels: channels, + }); + } else { + setFilter(omit(filter, 'byChannels')); + } }; - const isTagSelected = (tagList: Array, tag: TagModel) => { + const isTagSelected = (tagList: string[], tag: TagModel) => { return (tagList || []).includes(tag.id); }; const toggleTag = (tag: TagModel) => { const tags = filter.byTags ? [...filter.byTags] : []; isTagSelected(tags, tag) ? tags.splice(tags.indexOf(tag.id), 1) : tags.push(tag.id); - setFilter({ - ...filter, - byTags: tags, - }); + if (tags.length > 0) { + setFilter({ + ...filter, + byTags: tags, + }); + } else { + setFilter(omit(filter, 'byTags')); + } }; const OpenIcon = () => { @@ -111,7 +115,7 @@ const PopUpFilter = (props: PopUpFilterProps) => { return ( applyPressed()} + close={closeCallback} style={{marginTop: '10px'}} coverStyle={{backgroundColor: 'rgba(247,247,247,0.7)'}}>
@@ -122,12 +126,12 @@ const PopUpFilter = (props: PopUpFilterProps) => {
@@ -143,7 +147,7 @@ const PopUpFilter = (props: PopUpFilterProps) => { ? styles.filterButton : styles.filterButtonSelected } - onClick={(event: React.MouseEvent) => toggleState(event, true)}> + onClick={(event: React.MouseEvent) => setState(event, true)}> Open @@ -153,7 +157,7 @@ const PopUpFilter = (props: PopUpFilterProps) => { ? styles.filterButton : styles.filterButtonSelected } - onClick={(event: React.MouseEvent) => toggleState(event, false)}> + onClick={(event: React.MouseEvent) => setState(event, false)}> Closed @@ -220,8 +224,8 @@ const PopUpFilter = (props: PopUpFilterProps) => {
- resetPressed(e)}>Clear All -
diff --git a/frontend/ui/src/pages/Inbox/ConversationsFilter/index.module.scss b/frontend/ui/src/pages/Inbox/QuickFilter/index.module.scss similarity index 100% rename from frontend/ui/src/pages/Inbox/ConversationsFilter/index.module.scss rename to frontend/ui/src/pages/Inbox/QuickFilter/index.module.scss diff --git a/frontend/ui/src/pages/Inbox/QuickFilter/index.tsx b/frontend/ui/src/pages/Inbox/QuickFilter/index.tsx new file mode 100644 index 0000000000..1bad8fb00f --- /dev/null +++ b/frontend/ui/src/pages/Inbox/QuickFilter/index.tsx @@ -0,0 +1,81 @@ +import React, {useState, useEffect} from 'react'; +import _, {connect, ConnectedProps} from 'react-redux'; +import {ConversationFilter} from 'model'; + +import {StateModel} from '../../../reducers'; + +import {setFilter} from '../../../actions/conversationsFilter'; + +import styles from './index.module.scss'; +import {omit} from 'lodash'; + +const mapStateToProps = (state: StateModel) => { + return { + currentFilter: state.data.conversations.filtered.currentFilter, + }; +}; + +const mapDispatchToProps = { + setFilter, +}; + +type filterStates = 'all' | 'open' | 'closed'; + +const connector = connect(mapStateToProps, mapDispatchToProps); + +type ConversationsFilterProps = {} & ConnectedProps; + +const QuickFilter = (props: ConversationsFilterProps) => { + const {setFilter, currentFilter} = props; + const [filterState, setFilterState] = useState('all'); + + useEffect(() => { + const {isStateOpen} = currentFilter; + if (isStateOpen === undefined) { + setFilterState('all'); + } else { + setFilterState(isStateOpen ? 'open' : 'closed'); + } + }, [currentFilter]); + + const setCurrentState = (newState: filterStates) => { + let newFilter: ConversationFilter = {...omit(currentFilter, 'isStateOpen')}; + if (newState !== 'all') { + newFilter = { + ...newFilter, + isStateOpen: newState === 'open', + }; + } + + setFilter(newFilter); + setFilterState(newState); + }; + + return ( +
+
+
+
+ + + +
+
+
+
+ ); +}; + +export default connector(QuickFilter); From 01ab260ccc55055e3fa31b6a0b5eb171cac99e68 Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Tue, 11 May 2021 11:30:57 +0200 Subject: [PATCH 03/28] [#1681] Clean phone numer input (#1772) --- .../communication/ConversationsStateTest.java | 2 -- backend/sources/twilio/connector/BUILD | 1 + .../sources/twilio/ChannelsController.java | 16 +++++----- .../core/sources/twilio/SendMessageTest.java | 29 ++++++++++++------- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/backend/api/communication/src/test/java/co/airy/core/api/communication/ConversationsStateTest.java b/backend/api/communication/src/test/java/co/airy/core/api/communication/ConversationsStateTest.java index c479a3529a..068c784bb0 100644 --- a/backend/api/communication/src/test/java/co/airy/core/api/communication/ConversationsStateTest.java +++ b/backend/api/communication/src/test/java/co/airy/core/api/communication/ConversationsStateTest.java @@ -25,8 +25,6 @@ import static co.airy.core.api.communication.util.Topics.applicationCommunicationChannels; import static co.airy.core.api.communication.util.Topics.getTopics; import static co.airy.test.Timing.retryOnException; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; diff --git a/backend/sources/twilio/connector/BUILD b/backend/sources/twilio/connector/BUILD index 35f04ebb47..5b86d641a6 100644 --- a/backend/sources/twilio/connector/BUILD +++ b/backend/sources/twilio/connector/BUILD @@ -36,6 +36,7 @@ springboot( "//backend:base_test", "@maven//:javax_xml_bind_jaxb_api", "//lib/java/kafka/test:kafka-test", + "//lib/java/spring/test:spring-test", ] + app_deps, ) for file in glob(["src/test/java/**/*Test.java"]) diff --git a/backend/sources/twilio/connector/src/main/java/co/airy/core/sources/twilio/ChannelsController.java b/backend/sources/twilio/connector/src/main/java/co/airy/core/sources/twilio/ChannelsController.java index c6d639c15a..925a1d5956 100644 --- a/backend/sources/twilio/connector/src/main/java/co/airy/core/sources/twilio/ChannelsController.java +++ b/backend/sources/twilio/connector/src/main/java/co/airy/core/sources/twilio/ChannelsController.java @@ -3,7 +3,6 @@ import co.airy.avro.communication.Channel; import co.airy.avro.communication.ChannelConnectionState; import co.airy.avro.communication.Metadata; -import co.airy.kafka.schema.application.ApplicationCommunicationChannels; import co.airy.model.channel.dto.ChannelContainer; import co.airy.model.metadata.MetadataKeys; import co.airy.model.metadata.dto.MetadataMap; @@ -11,7 +10,6 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import org.apache.kafka.clients.producer.KafkaProducer; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; @@ -22,6 +20,7 @@ import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.UUID; import static co.airy.model.channel.ChannelPayload.fromChannelContainer; @@ -29,14 +28,10 @@ @RestController public class ChannelsController { - private static final String applicationCommunicationChannels = new ApplicationCommunicationChannels().name(); - private final Stores stores; - private final KafkaProducer producer; - public ChannelsController(Stores stores, KafkaProducer producer) { + public ChannelsController(Stores stores) { this.stores = stores; - this.producer = producer; } @PostMapping("/channels.twilio.sms.connect") @@ -131,6 +126,13 @@ private ResponseEntity disconnect(@RequestBody @Valid DisconnectChannelReques class ConnectChannelRequestPayload { @NotNull private String phoneNumber; + + public String getPhoneNumber() { + return Optional.ofNullable(phoneNumber) + .map((phoneNumber) -> phoneNumber.replaceAll("\\s+","").trim()) + .orElse(null); + } + @NotNull private String name; private String imageUrl; diff --git a/backend/sources/twilio/connector/src/test/java/co/airy/core/sources/twilio/SendMessageTest.java b/backend/sources/twilio/connector/src/test/java/co/airy/core/sources/twilio/SendMessageTest.java index d26f1d5355..d9baa2d057 100644 --- a/backend/sources/twilio/connector/src/test/java/co/airy/core/sources/twilio/SendMessageTest.java +++ b/backend/sources/twilio/connector/src/test/java/co/airy/core/sources/twilio/SendMessageTest.java @@ -11,6 +11,9 @@ import co.airy.kafka.test.KafkaTestHelper; import co.airy.kafka.test.junit.SharedKafkaTestResource; import co.airy.spring.core.AirySpringBootApplication; +import co.airy.spring.test.WebTestHelper; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -22,6 +25,7 @@ import org.mockito.InjectMocks; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.TestPropertySource; @@ -36,9 +40,11 @@ import static org.apache.kafka.streams.KafkaStreams.State.RUNNING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.doNothing; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest(classes = AirySpringBootApplication.class) @TestPropertySource(value = "classpath:test.properties") +@AutoConfigureMockMvc @ExtendWith(SpringExtension.class) class SendMessageTest { @@ -56,6 +62,9 @@ class SendMessageTest { @InjectMocks private Connector worker; + @Autowired + private WebTestHelper webTestHelper; + @Autowired private Stores stores; @@ -77,7 +86,7 @@ static void afterAll() throws Exception { @BeforeEach void beforeEach() throws InterruptedException { MockitoAnnotations.openMocks(this); - retryOnException(() -> assertEquals(stores.getStreamState(), RUNNING), "Failed to reach RUNNING state."); + webTestHelper.waitUntilHealthy(); } @Test @@ -86,8 +95,6 @@ void canSendMessageViaTheTwilioApi() throws Exception { final String messageId = UUID.randomUUID().toString(); final String sourceConversationId = "+491234567"; final String sourceChannelId = "+497654321"; - final String channelId = UUID.randomUUID().toString(); - final String token = "token"; final String text = "Hello World"; ArgumentCaptor payloadCaptor = ArgumentCaptor.forClass(String.class); @@ -95,15 +102,15 @@ void canSendMessageViaTheTwilioApi() throws Exception { ArgumentCaptor toCaptor = ArgumentCaptor.forClass(String.class); doNothing().when(api).sendMessage(fromCaptor.capture(), toCaptor.capture(), payloadCaptor.capture()); + // Test that phone number input gets cleaned up + final String payload = "{\"phone_number\":\"+49 765 4321 \",\"name\":\"Blips and Chitz\"}"; + final String response = webTestHelper.post("/channels.twilio.sms.connect", payload) + .andExpect(status().isOk()) + .andReturn().getResponse().getContentAsString(); + final JsonNode jsonNode = new ObjectMapper().readTree(response); + final String channelId = jsonNode.get("id").textValue(); + kafkaTestHelper.produceRecords(List.of( - new ProducerRecord<>(applicationCommunicationChannels.name(), channelId, Channel.newBuilder() - .setToken(token) - .setSourceChannelId(sourceChannelId) - .setSource("twilio.sms") - .setId(channelId) - .setConnectionState(ChannelConnectionState.CONNECTED) - .build() - ), new ProducerRecord<>(applicationCommunicationMessages.name(), "other-message-id", Message.newBuilder() .setId("other-message-id") From 4b5fa6794fa6e678bfe04479809fa31ddc19e1e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 13:13:22 +0200 Subject: [PATCH 04/28] Bump webpack from 5.36.2 to 5.37.0 (#1770) Bumps [webpack](https://github.com/webpack/webpack) from 5.36.2 to 5.37.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.36.2...v5.37.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 131ed089ee..a260446b50 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "terser-webpack-plugin": "^5.1.1", "typescript": "4.2.4", "url-loader": "^4.1.1", - "webpack": "^5.36.2", + "webpack": "^5.37.0", "webpack-bundle-analyzer": "^4.4.1", "webpack-cli": "^4.7.0", "webpack-dev-server": "^3.11.2" diff --git a/yarn.lock b/yarn.lock index 27ab2753b1..8a567facfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7719,10 +7719,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.36.2: - version "5.36.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.2.tgz#6ef1fb2453ad52faa61e78d486d353d07cca8a0f" - integrity sha512-XJumVnnGoH2dV+Pk1VwgY4YT6AiMKpVoudUFCNOXMIVrEKPUgEwdIfWPjIuGLESAiS8EdIHX5+TiJz/5JccmRg== +webpack@^5.37.0: + version "5.37.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.37.0.tgz#2ab00f613faf494504eb2beef278dab7493cc39d" + integrity sha512-yvdhgcI6QkQkDe1hINBAJ1UNevqNGTVaCkD2SSJcB8rcrNNl922RI8i2DXUAuNfANoxwsiXXEA4ZPZI9q2oGLA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 74f3d5c3c1232789c58f84ab8eec772282da065a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 13:14:25 +0200 Subject: [PATCH 05/28] Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.23.0 (#1769) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.1 to 4.23.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.23.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 60 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index a260446b50..22328eedd7 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/lodash-es": "^4.17.4", "@types/react-window-infinite-loader": "^1.0.3", "@types/resize-observer-browser": "^0.1.5", - "@typescript-eslint/eslint-plugin": "^4.22.1", + "@typescript-eslint/eslint-plugin": "^4.23.0", "@typescript-eslint/parser": "^4.22.1", "babel-loader": "^8.0.6", "copy-webpack-plugin": "^8.1.1", diff --git a/yarn.lock b/yarn.lock index 8a567facfd..5f8116d6dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1516,13 +1516,13 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== -"@typescript-eslint/eslint-plugin@^4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.1.tgz#6bcdbaa4548553ab861b4e5f34936ead1349a543" - integrity sha512-kVTAghWDDhsvQ602tHBc6WmQkdaYbkcTwZu+7l24jtJiYvm9l+/y/b2BZANEezxPDiX5MK2ZecE+9BFi/YJryw== +"@typescript-eslint/eslint-plugin@^4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.23.0.tgz#29d3c9c81f6200b1fd6d8454cfb007ba176cde80" + integrity sha512-tGK1y3KIvdsQEEgq6xNn1DjiFJtl+wn8JJQiETtCbdQxw1vzjXyAaIkEmO2l6Nq24iy3uZBMFQjZ6ECf1QdgGw== dependencies: - "@typescript-eslint/experimental-utils" "4.22.1" - "@typescript-eslint/scope-manager" "4.22.1" + "@typescript-eslint/experimental-utils" "4.23.0" + "@typescript-eslint/scope-manager" "4.23.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -1530,15 +1530,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.1.tgz#3938a5c89b27dc9a39b5de63a62ab1623ab27497" - integrity sha512-svYlHecSMCQGDO2qN1v477ax/IDQwWhc7PRBiwAdAMJE7GXk5stF4Z9R/8wbRkuX/5e9dHqbIWxjeOjckK3wLQ== +"@typescript-eslint/experimental-utils@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.23.0.tgz#f2059434cd6e5672bfeab2fb03b7c0a20622266f" + integrity sha512-WAFNiTDnQfrF3Z2fQ05nmCgPsO5o790vOhmWKXbbYQTO9erE1/YsFot5/LnOUizLzU2eeuz6+U/81KV5/hFTGA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.22.1" - "@typescript-eslint/types" "4.22.1" - "@typescript-eslint/typescript-estree" "4.22.1" + "@typescript-eslint/scope-manager" "4.23.0" + "@typescript-eslint/types" "4.23.0" + "@typescript-eslint/typescript-estree" "4.23.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1560,11 +1560,24 @@ "@typescript-eslint/types" "4.22.1" "@typescript-eslint/visitor-keys" "4.22.1" +"@typescript-eslint/scope-manager@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.23.0.tgz#8792ef7eacac122e2ec8fa2d30a59b8d9a1f1ce4" + integrity sha512-ZZ21PCFxPhI3n0wuqEJK9omkw51wi2bmeKJvlRZPH5YFkcawKOuRMQMnI8mH6Vo0/DoHSeZJnHiIx84LmVQY+w== + dependencies: + "@typescript-eslint/types" "4.23.0" + "@typescript-eslint/visitor-keys" "4.23.0" + "@typescript-eslint/types@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.1.tgz#bf99c6cec0b4a23d53a61894816927f2adad856a" integrity sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw== +"@typescript-eslint/types@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" + integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== + "@typescript-eslint/typescript-estree@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz#dca379eead8cdfd4edc04805e83af6d148c164f9" @@ -1578,6 +1591,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz#0753b292097523852428a6f5a1aa8ccc1aae6cd9" + integrity sha512-5Sty6zPEVZF5fbvrZczfmLCOcby3sfrSPu30qKoY1U3mca5/jvU5cwsPb/CO6Q3ByRjixTMIVsDkqwIxCf/dMw== + dependencies: + "@typescript-eslint/types" "4.23.0" + "@typescript-eslint/visitor-keys" "4.23.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.22.1": version "4.22.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz#6045ae25a11662c671f90b3a403d682dfca0b7a6" @@ -1586,6 +1612,14 @@ "@typescript-eslint/types" "4.22.1" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz#7215cc977bd3b4ef22467b9023594e32f9e4e455" + integrity sha512-5PNe5cmX9pSifit0H+nPoQBXdbNzi5tOEec+3riK+ku4e3er37pKxMKDH5Ct5Y4fhWxcD4spnlYjxi9vXbSpwg== + dependencies: + "@typescript-eslint/types" "4.23.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" From 1ab923de18a02e0508b1a01c6617a68456ef754b Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Tue, 11 May 2021 15:58:08 +0200 Subject: [PATCH 06/28] [#1764] Filter fixed + state header bar toggle fix (#1774) * filter fixed + state header bar toggle fix * linting --- .../Messenger/ConversationStatus/index.tsx | 18 ++++++++++-------- frontend/ui/src/selectors/conversations.ts | 11 +++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/frontend/ui/src/pages/Inbox/Messenger/ConversationStatus/index.tsx b/frontend/ui/src/pages/Inbox/Messenger/ConversationStatus/index.tsx index 85731630b6..21a030dbc7 100644 --- a/frontend/ui/src/pages/Inbox/Messenger/ConversationStatus/index.tsx +++ b/frontend/ui/src/pages/Inbox/Messenger/ConversationStatus/index.tsx @@ -2,12 +2,13 @@ import React from 'react'; import {connect, ConnectedProps} from 'react-redux'; import {withRouter, RouteComponentProps} from 'react-router-dom'; import styles from './index.module.scss'; -import {getConversation} from '../../../../selectors/conversations'; import {conversationState} from '../../../../actions/conversations'; +import {StateModel} from '../../../../reducers'; -const mapStateToProps = (state, ownProps) => { +const mapStateToProps = (state: StateModel, ownProps) => { return { - conversation: getConversation(state, ownProps), + currentConversationState: + state.data.conversations.all.items[ownProps.match.params.conversationId]?.metadata?.state || 'OPEN', }; }; @@ -17,22 +18,23 @@ const mapDispatchToProps = { const connector = connect(mapStateToProps, mapDispatchToProps); -type Props = ConnectedProps & RouteComponentProps<{id: string}>; +type Props = ConnectedProps & RouteComponentProps<{conversationId: string}>; function ConversationStatus(props: Props) { - const {conversation, conversationState} = props; - const currentConversationState = conversation.metadata.state || 'OPEN'; + const {currentConversationState, conversationState} = props; return (
-
conversationState(conversation.id, 'CLOSED')}> +
conversationState(props.match.params.conversationId, 'CLOSED')}> Closed
-
conversationState(conversation.id, 'OPEN')}> +
conversationState(props.match.params.conversationId, 'OPEN')}> Open
diff --git a/frontend/ui/src/selectors/conversations.ts b/frontend/ui/src/selectors/conversations.ts index 6d7fdae25b..6af5843271 100644 --- a/frontend/ui/src/selectors/conversations.ts +++ b/frontend/ui/src/selectors/conversations.ts @@ -85,13 +85,13 @@ export const newestFilteredConversationFirst = createSelector( if (!isFulfilled) return isFulfilled; } - if (currentFilter.readOnly) { + if (currentFilter.readOnly && isFulfilled) { isFulfilled = conversation.metadata.unreadCount === 0; } else if (currentFilter.unreadOnly) { isFulfilled = conversation.metadata.unreadCount > 0; } - if (currentFilter.byTags) { + if (currentFilter.byTags && isFulfilled) { const conversationTags = Object.keys(conversation.metadata.tags || {}).map((id: string) => id); const filterTags = Object.keys(currentFilter.byTags).map((id: string) => currentFilter.byTags[id]); @@ -100,27 +100,26 @@ export const newestFilteredConversationFirst = createSelector( }); } - if (currentFilter.byChannels?.length > 0) { + if (currentFilter.byChannels?.length > 0 && isFulfilled) { const channelId = conversation.channel.id; const filterChannel = Object.keys(currentFilter.byChannels).map((id: string) => currentFilter.byChannels[id]); isFulfilled = filterChannel.includes(channelId); } - if (currentFilter.bySources?.length > 0) { + if (currentFilter.bySources?.length > 0 && isFulfilled) { const conversationSource = conversation.channel.source; const filterSource = Object.keys(currentFilter.bySources).map((id: string) => currentFilter.bySources[id]); isFulfilled = filterSource.includes(conversationSource); } - if (currentFilter.displayName) { + if (currentFilter.displayName && isFulfilled) { const searchValue = currentFilter.displayName.toLowerCase(); const displayName = conversation.metadata.contact.displayName.toLowerCase(); isFulfilled = displayName.includes(searchValue); } - if (!isFulfilled) return isFulfilled; return isFulfilled; }); From 5fcdfaa591eaced7cb6756c5505f4238cb4f11b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 16:18:16 +0200 Subject: [PATCH 07/28] Bump eslint from 7.25.0 to 7.26.0 (#1760) Bumps [eslint](https://github.com/eslint/eslint) from 7.25.0 to 7.26.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.25.0...v7.26.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 22328eedd7..336dfa1aae 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "copy-webpack-plugin": "^8.1.1", "css-loader": "^5.2.4", "cypress": "^7.2.0", - "eslint": "^7.25.0", + "eslint": "^7.26.0", "eslint-plugin-react": "^7.23.2", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.1", diff --git a/yarn.lock b/yarn.lock index 5f8116d6dc..515afe5022 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1091,10 +1091,10 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== -"@eslint/eslintrc@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547" - integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== +"@eslint/eslintrc@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" + integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -3298,13 +3298,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.25.0: - version "7.25.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.25.0.tgz#1309e4404d94e676e3e831b3a3ad2b050031eb67" - integrity sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw== +eslint@^7.26.0: + version "7.26.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.26.0.tgz#d416fdcdcb3236cd8f282065312813f8c13982f6" + integrity sha512-4R1ieRf52/izcZE7AlLy56uIHHDLT74Yzz2Iv2l6kDaYvEu9x+wMB5dZArVL8SYGXSYV2YAg70FcW5Y5nGGNIg== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.0" + "@eslint/eslintrc" "^0.4.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" From 4c546912ffbb8f9acdbfa22670e65000d93459b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 16:19:01 +0200 Subject: [PATCH 08/28] Bump prettier from 2.2.1 to 2.3.0 (#1759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump prettier from 2.2.1 to 2.3.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.0) Signed-off-by: dependabot[bot] * apply new prettier rule Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christoph Pröschel --- docs/docs/ui/inbox.md | 4 +-- frontend/ui/src/actions/channel/index.ts | 26 +++++++++----------- frontend/ui/src/components/ColorSelector.tsx | 7 +++--- lib/typescript/httpclient/client.ts | 16 +++++------- package.json | 2 +- yarn.lock | 8 +++--- 6 files changed, 29 insertions(+), 34 deletions(-) diff --git a/docs/docs/ui/inbox.md b/docs/docs/ui/inbox.md index 1d0bafdc3e..f0d277ac5b 100644 --- a/docs/docs/ui/inbox.md +++ b/docs/docs/ui/inbox.md @@ -77,7 +77,7 @@ Airy’s Inbox supports all [Google’s Rich Cards variants from Rich Cards to C { "conversation_id": "a688d36c-a85e-44af-bc02-4248c2c97622", "message": { - "fallback": 'Hello, world!\n\nReply with "A" or "B"', + "fallback": "Hello, world!\n\nReply with \"A\" or \"B\"", "richCard": { "standaloneCard": { "cardContent": { @@ -135,7 +135,7 @@ link='sources/chatplugin/overview' { "conversation_id": "a688d36c-a85e-44af-bc02-4248c2c97622", "message": { - "fallback": 'Card #1\n #1\n\nCard #2\n\n\nReply with "Card #1" or "Card #2"', + "fallback": "Card #1\n #1\n\nCard #2\n\n\nReply with \"Card #1\" or \"Card #2\"", "richCard": { "carouselCard": { "cardWidth": "MEDIUM", diff --git a/frontend/ui/src/actions/channel/index.ts b/frontend/ui/src/actions/channel/index.ts index e9bb5e7297..47b1651208 100644 --- a/frontend/ui/src/actions/channel/index.ts +++ b/frontend/ui/src/actions/channel/index.ts @@ -41,13 +41,12 @@ export const exploreChannels = (requestPayload: ExploreChannelRequestPayload) => }); }; -export const connectFacebookChannel = (requestPayload: ConnectChannelFacebookRequestPayload) => async ( - dispatch: Dispatch -) => - HttpClientInstance.connectFacebookChannel(requestPayload).then((response: Channel) => { - dispatch(addChannelsAction([response])); - return Promise.resolve(response); - }); +export const connectFacebookChannel = + (requestPayload: ConnectChannelFacebookRequestPayload) => async (dispatch: Dispatch) => + HttpClientInstance.connectFacebookChannel(requestPayload).then((response: Channel) => { + dispatch(addChannelsAction([response])); + return Promise.resolve(response); + }); export const connectChatPlugin = (requestPayload: ConnectChatPluginRequestPayload) => async (dispatch: Dispatch) => HttpClientInstance.connectChatPluginChannel(requestPayload).then((response: Channel) => { @@ -61,13 +60,12 @@ export const connectTwilioSms = (requestPayload: ConnectTwilioSmsRequestPayload) return Promise.resolve(response); }); -export const connectTwilioWhatsapp = (requestPayload: ConnectTwilioWhatsappRequestPayload) => async ( - dispatch: Dispatch -) => - HttpClientInstance.connectTwilioWhatsappChannel(requestPayload).then((response: Channel) => { - dispatch(addChannelsAction([response])); - return Promise.resolve(response); - }); +export const connectTwilioWhatsapp = + (requestPayload: ConnectTwilioWhatsappRequestPayload) => async (dispatch: Dispatch) => + HttpClientInstance.connectTwilioWhatsappChannel(requestPayload).then((response: Channel) => { + dispatch(addChannelsAction([response])); + return Promise.resolve(response); + }); export const updateChannel = (requestPayload: UpdateChannelRequestPayload) => async (dispatch: Dispatch) => HttpClientInstance.updateChannel(requestPayload).then((response: Channel) => { diff --git a/frontend/ui/src/components/ColorSelector.tsx b/frontend/ui/src/components/ColorSelector.tsx index 14443b5910..e7e9d693ab 100644 --- a/frontend/ui/src/components/ColorSelector.tsx +++ b/frontend/ui/src/components/ColorSelector.tsx @@ -24,9 +24,10 @@ type ColorSelectorState = { }; const ColorSelector = ({handleUpdate, color, editing, id, settings}: ColorSelectorProps & ColorSelectorState) => { - const getColorValue = useCallback((color: string) => (settings && settings.colors[color].default) || '1578D4', [ - settings, - ]); + const getColorValue = useCallback( + (color: string) => (settings && settings.colors[color].default) || '1578D4', + [settings] + ); const dataCyTagsDialogColorSelectorBlue = cyTagsDialogColorSelectorBlue; const dataCyTagsDialogColorSelectorRed = cyTagsDialogColorSelectorRed; const dataCyTagsDialogColorSelectorGreen = cyTagsDialogColorSelectorGreen; diff --git a/lib/typescript/httpclient/client.ts b/lib/typescript/httpclient/client.ts index 1c9101642d..0ca35276bb 100644 --- a/lib/typescript/httpclient/client.ts +++ b/lib/typescript/httpclient/client.ts @@ -139,13 +139,11 @@ export class HttpClient { public exploreFacebookChannels = this.getRequest(exploreFacebookChannelsDef); - public connectFacebookChannel = this.getRequest( - connectFacebookChannelDef - ); + public connectFacebookChannel = + this.getRequest(connectFacebookChannelDef); - public connectChatPluginChannel = this.getRequest( - connectChatPluginChannelDef - ); + public connectChatPluginChannel = + this.getRequest(connectChatPluginChannelDef); public connectTwilioSmsChannel = this.getRequest(connectTwilioSmsChannelDef); @@ -157,10 +155,8 @@ export class HttpClient { public disconnectChannel = this.getRequest(disconnectChannelDef); - public listConversations: ApiRequest< - ListConversationsRequestPayload, - PaginatedResponse - > = this.getRequest(listConversationsDef); + public listConversations: ApiRequest> = + this.getRequest(listConversationsDef); public getConversationInfo = this.getRequest(getConversationInfoDef); diff --git a/package.json b/package.json index 336dfa1aae..5dfbcdc04c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.1", "minimist": "^1.2.5", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "react-hot-loader": "^4.13.0", "sass": "^1.32.12", "sass-loader": "^11", diff --git a/yarn.lock b/yarn.lock index 515afe5022..994021ff97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5870,10 +5870,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +prettier@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== pretty-bytes@^5.6.0: version "5.6.0" From 188fde86e004f7b77f4fdb71932627a564e01a40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 16:24:50 +0200 Subject: [PATCH 09/28] Bump core-js from 3.12.0 to 3.12.1 (#1758) Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.12.0 to 3.12.1. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.12.1/packages/core-js) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5dfbcdc04c..c59ba7c8da 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@types/react-redux": "7.1.16", "@types/react-router-dom": "^5.1.7", "camelcase-keys": "^6.2.2", - "core-js": "3.12.0", + "core-js": "3.12.1", "emoji-mart": "3.0.1", "linkifyjs": "^2.1.9", "lodash-es": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index 994021ff97..d82d1e273f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2707,10 +2707,10 @@ core-js-compat@^3.9.0, core-js-compat@^3.9.1: browserslist "^4.16.3" semver "7.0.0" -core-js@3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.12.0.tgz#62bac86f7d7f087d40dba3e90a211c2c3c8559ea" - integrity sha512-SaMnchL//WwU2Ot1hhkPflE8gzo7uq1FGvUJ8GKmi3TOU7rGTHIU+eir1WGf6qOtTyxdfdcp10yPdGZ59sQ3hw== +core-js@3.12.1: + version "3.12.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.12.1.tgz#6b5af4ff55616c08a44d386f1f510917ff204112" + integrity sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" From dfca3530000e578a03a62f0a23a5aaaffde81f44 Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Wed, 12 May 2021 15:20:34 +0200 Subject: [PATCH 10/28] [#1743] Return proper status code for unauthorized access (#1785) --- .../java/co/airy/spring/auth/AuthConfig.java | 11 ++++---- .../CookieSecurityContextRepository.java | 7 +++-- .../airy/spring/auth/AuthenticationTest.java | 2 +- .../java/co/airy/spring/auth/OidcTest.java | 5 ++-- lib/typescript/httpclient/client.ts | 28 +++---------------- 5 files changed, 16 insertions(+), 37 deletions(-) diff --git a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java index a8b7afc209..3747a04e12 100644 --- a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java +++ b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java @@ -21,6 +21,7 @@ import org.springframework.security.core.AuthenticationException; import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; +import org.springframework.security.web.authentication.Http403ForbiddenEntryPoint; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @@ -42,14 +43,12 @@ public class AuthConfig extends WebSecurityConfigurerAdapter { private final String[] ignoreAuthPatterns; private final String systemToken; private final String jwtSecret; - private final UserService userService; private final ConfigProvider configProvider; public AuthConfig(@Value("${systemToken:#{null}}") String systemToken, @Value("${jwtSecret:#{null}}") String jwtSecret, List ignorePatternBeans, - ConfigProvider configProvider, - UserService userService + ConfigProvider configProvider ) { this.systemToken = systemToken; this.jwtSecret = jwtSecret; @@ -57,7 +56,6 @@ public AuthConfig(@Value("${systemToken:#{null}}") String systemToken, .flatMap((ignoreAuthPatternBean -> ignoreAuthPatternBean.getIgnorePattern().stream())) .toArray(String[]::new); this.configProvider = configProvider; - this.userService = userService; } @Override @@ -72,7 +70,7 @@ protected void configure(final HttpSecurity http) throws Exception { .antMatchers("/actuator/**").permitAll() .antMatchers(ignoreAuthPatterns).permitAll() .anyRequest().authenticated() - ); + ).exceptionHandling().authenticationEntryPoint(new Http403ForbiddenEntryPoint()); if (systemToken != null) { log.info("System token auth enabled"); @@ -86,7 +84,8 @@ protected void configure(final HttpSecurity http) throws Exception { .and().logout().permitAll().deleteCookies(AuthCookie.NAME) .and() .oauth2Login(oauth2 -> oauth2 - .defaultSuccessUrl("/ui/")) + .defaultSuccessUrl("/ui/") + ) .addFilterAfter(new EmailFilter(configProvider), OAuth2LoginAuthenticationFilter.class); } } diff --git a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java index 416907f229..c7106911bf 100644 --- a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java +++ b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java @@ -74,7 +74,7 @@ private Optional getStoredAuth(HttpServletRequest request) { }); } - private Optional getCookie(HttpServletRequest request) { + public static Optional getCookie(HttpServletRequest request) { if (request.getCookies() == null) { return Optional.empty(); } @@ -113,8 +113,9 @@ protected void saveContext(SecurityContext securityContext) { } catch (JsonProcessingException e) { throw new RuntimeException(e); } - } else if (authentication == null || !authentication.isAuthenticated()) { - // Remove the cookie if there is no auth present + + // Remove the cookie if it's present but the user is not authorized + } else if ((authentication == null || !authentication.isAuthenticated()) && getCookie(request).isPresent()) { response.addCookie(new AuthCookie("")); } } diff --git a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java index 50400616c0..f6cb5e43c6 100644 --- a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java +++ b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java @@ -29,7 +29,7 @@ public class AuthenticationTest { private MockMvc mvc; @Test - void rejectsMissingJwt() throws Exception { + void rejectsMissingToken() throws Exception { mvc.perform(post("/principal.get")) .andExpect(status().isForbidden()) .andExpect(jsonPath("$").doesNotExist()); diff --git a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java index 6da7caea98..f156281bca 100644 --- a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java +++ b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java @@ -32,10 +32,9 @@ public class OidcTest { private MockMvc mvc; @Test - void redirectsToAuth() throws Exception { + void rejectsMissingAuth() throws Exception { mvc.perform(post("/principal.get")) - .andExpect(status().is3xxRedirection()) - .andExpect(header().exists("Location")) + .andExpect(status().isForbidden()) .andExpect(jsonPath("$").doesNotExist()); } diff --git a/lib/typescript/httpclient/client.ts b/lib/typescript/httpclient/client.ts index 0ca35276bb..2475b856f4 100644 --- a/lib/typescript/httpclient/client.ts +++ b/lib/typescript/httpclient/client.ts @@ -72,7 +72,6 @@ export class HttpClient { private async doFetchFromBackend(url: string, body?: any): Promise { const headers = { Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest', }; if (!(body instanceof FormData)) { @@ -94,12 +93,6 @@ export class HttpClient { } private async parseBody(response: Response): Promise { - if (this.isAuthRedirect(response)) { - const err = new Error('Unauthorized'); - this.onAuthError(err); - return Promise.reject(err); - } - if (response.ok) { try { return await response.json(); @@ -109,30 +102,17 @@ export class HttpClient { } const body: string = await response.text(); - let errorResult: any; + let errorResult = body; if (body.length > 0) { errorResult = JSON.parse(body) as any; } - if (response.status === 403) { - this.onAuthError(errorResult); + if (response.status === 403 && this.unauthorizedErrorCallback) { + this.unauthorizedErrorCallback(errorResult, this.loginUrl); } - throw { - status: response.status, - body: errorResult, - }; - } - - private isAuthRedirect(response: Response): boolean { - return response.redirected === true && response.url === this.loginUrl; - } - - private onAuthError(err) { - if (this.unauthorizedErrorCallback) { - this.unauthorizedErrorCallback(err, this.loginUrl); - } + throw new Error(`Request failed with status code ${response.status} and error ${errorResult}`); } public listChannels = this.getRequest(listChannelsDef); From f2cb8c6c1b2ad015d0751cb89c7fca8625f04050 Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Wed, 12 May 2021 19:28:38 +0200 Subject: [PATCH 11/28] Revert "[#1743] Return proper status code for unauthorized access (#1785)" (#1788) This reverts commit dfca3530000e578a03a62f0a23a5aaaffde81f44. --- .../java/co/airy/spring/auth/AuthConfig.java | 11 ++++---- .../CookieSecurityContextRepository.java | 7 ++--- .../airy/spring/auth/AuthenticationTest.java | 2 +- .../java/co/airy/spring/auth/OidcTest.java | 5 ++-- lib/typescript/httpclient/client.ts | 28 ++++++++++++++++--- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java index 3747a04e12..a8b7afc209 100644 --- a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java +++ b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java @@ -21,7 +21,6 @@ import org.springframework.security.core.AuthenticationException; import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; -import org.springframework.security.web.authentication.Http403ForbiddenEntryPoint; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @@ -43,12 +42,14 @@ public class AuthConfig extends WebSecurityConfigurerAdapter { private final String[] ignoreAuthPatterns; private final String systemToken; private final String jwtSecret; + private final UserService userService; private final ConfigProvider configProvider; public AuthConfig(@Value("${systemToken:#{null}}") String systemToken, @Value("${jwtSecret:#{null}}") String jwtSecret, List ignorePatternBeans, - ConfigProvider configProvider + ConfigProvider configProvider, + UserService userService ) { this.systemToken = systemToken; this.jwtSecret = jwtSecret; @@ -56,6 +57,7 @@ public AuthConfig(@Value("${systemToken:#{null}}") String systemToken, .flatMap((ignoreAuthPatternBean -> ignoreAuthPatternBean.getIgnorePattern().stream())) .toArray(String[]::new); this.configProvider = configProvider; + this.userService = userService; } @Override @@ -70,7 +72,7 @@ protected void configure(final HttpSecurity http) throws Exception { .antMatchers("/actuator/**").permitAll() .antMatchers(ignoreAuthPatterns).permitAll() .anyRequest().authenticated() - ).exceptionHandling().authenticationEntryPoint(new Http403ForbiddenEntryPoint()); + ); if (systemToken != null) { log.info("System token auth enabled"); @@ -84,8 +86,7 @@ protected void configure(final HttpSecurity http) throws Exception { .and().logout().permitAll().deleteCookies(AuthCookie.NAME) .and() .oauth2Login(oauth2 -> oauth2 - .defaultSuccessUrl("/ui/") - ) + .defaultSuccessUrl("/ui/")) .addFilterAfter(new EmailFilter(configProvider), OAuth2LoginAuthenticationFilter.class); } } diff --git a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java index c7106911bf..416907f229 100644 --- a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java +++ b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/session/CookieSecurityContextRepository.java @@ -74,7 +74,7 @@ private Optional getStoredAuth(HttpServletRequest request) { }); } - public static Optional getCookie(HttpServletRequest request) { + private Optional getCookie(HttpServletRequest request) { if (request.getCookies() == null) { return Optional.empty(); } @@ -113,9 +113,8 @@ protected void saveContext(SecurityContext securityContext) { } catch (JsonProcessingException e) { throw new RuntimeException(e); } - - // Remove the cookie if it's present but the user is not authorized - } else if ((authentication == null || !authentication.isAuthenticated()) && getCookie(request).isPresent()) { + } else if (authentication == null || !authentication.isAuthenticated()) { + // Remove the cookie if there is no auth present response.addCookie(new AuthCookie("")); } } diff --git a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java index f6cb5e43c6..50400616c0 100644 --- a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java +++ b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/AuthenticationTest.java @@ -29,7 +29,7 @@ public class AuthenticationTest { private MockMvc mvc; @Test - void rejectsMissingToken() throws Exception { + void rejectsMissingJwt() throws Exception { mvc.perform(post("/principal.get")) .andExpect(status().isForbidden()) .andExpect(jsonPath("$").doesNotExist()); diff --git a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java index f156281bca..6da7caea98 100644 --- a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java +++ b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java @@ -32,9 +32,10 @@ public class OidcTest { private MockMvc mvc; @Test - void rejectsMissingAuth() throws Exception { + void redirectsToAuth() throws Exception { mvc.perform(post("/principal.get")) - .andExpect(status().isForbidden()) + .andExpect(status().is3xxRedirection()) + .andExpect(header().exists("Location")) .andExpect(jsonPath("$").doesNotExist()); } diff --git a/lib/typescript/httpclient/client.ts b/lib/typescript/httpclient/client.ts index 2475b856f4..0ca35276bb 100644 --- a/lib/typescript/httpclient/client.ts +++ b/lib/typescript/httpclient/client.ts @@ -72,6 +72,7 @@ export class HttpClient { private async doFetchFromBackend(url: string, body?: any): Promise { const headers = { Accept: 'application/json', + 'X-Requested-With': 'XMLHttpRequest', }; if (!(body instanceof FormData)) { @@ -93,6 +94,12 @@ export class HttpClient { } private async parseBody(response: Response): Promise { + if (this.isAuthRedirect(response)) { + const err = new Error('Unauthorized'); + this.onAuthError(err); + return Promise.reject(err); + } + if (response.ok) { try { return await response.json(); @@ -102,17 +109,30 @@ export class HttpClient { } const body: string = await response.text(); - let errorResult = body; + let errorResult: any; if (body.length > 0) { errorResult = JSON.parse(body) as any; } - if (response.status === 403 && this.unauthorizedErrorCallback) { - this.unauthorizedErrorCallback(errorResult, this.loginUrl); + if (response.status === 403) { + this.onAuthError(errorResult); } - throw new Error(`Request failed with status code ${response.status} and error ${errorResult}`); + throw { + status: response.status, + body: errorResult, + }; + } + + private isAuthRedirect(response: Response): boolean { + return response.redirected === true && response.url === this.loginUrl; + } + + private onAuthError(err) { + if (this.unauthorizedErrorCallback) { + this.unauthorizedErrorCallback(err, this.loginUrl); + } } public listChannels = this.getRequest(listChannelsDef); From 35e617a924179ef3836d0be8f08ae3631e6a7fa1 Mon Sep 17 00:00:00 2001 From: AudreyKj <38159391+AudreyKj@users.noreply.github.com> Date: Mon, 17 May 2021 09:29:34 +0200 Subject: [PATCH 12/28] [#1768] bad calls to conversations info when opening inbox (#1775) * fixed bad calls to conversation info when opening inbox * added error code * removed test * removed 404 check --- .../ui/src/pages/Inbox/Messenger/MessengerContainer/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/ui/src/pages/Inbox/Messenger/MessengerContainer/index.tsx b/frontend/ui/src/pages/Inbox/Messenger/MessengerContainer/index.tsx index 376bff3d24..3a5c93fe5c 100644 --- a/frontend/ui/src/pages/Inbox/Messenger/MessengerContainer/index.tsx +++ b/frontend/ui/src/pages/Inbox/Messenger/MessengerContainer/index.tsx @@ -35,10 +35,10 @@ const MessengerContainer = ({ const [suggestions, showSuggestedReplies] = useState(null); useEffect(() => { - if (!currentConversation) { + if (!currentConversation && match.params.conversationId) { getConversationInfo(match.params.conversationId); } - }, [conversations]); + }, [currentConversation, match.params.conversationId]); const hideSuggestedReplies = () => { showSuggestedReplies(null); From dd9ce20d15e083b3bb89024ad8d87551646df32d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 11:26:42 +0200 Subject: [PATCH 13/28] Bump @types/react-dom from 16.9.2 to 17.0.5 (#1789) Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 16.9.2 to 17.0.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c59ba7c8da..4b16dfe23b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@stomp/stompjs": "^6.1.0", "@types/node": "15.0.2", "@types/react": "17.0.5", - "@types/react-dom": "16.9.2", + "@types/react-dom": "17.0.5", "@types/react-redux": "7.1.16", "@types/react-router-dom": "^5.1.7", "camelcase-keys": "^6.2.2", diff --git a/yarn.lock b/yarn.lock index d82d1e273f..2b99572bfc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1433,10 +1433,10 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== -"@types/react-dom@16.9.2": - version "16.9.2" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.2.tgz#90f9e6c161850be1feb31d2f448121be2a4f3b47" - integrity sha512-hgPbBoI1aTSTvZwo8HYw35UaTldW6n2ETLvHAcfcg1FaOuBV3olmyCe5eMpx2WybWMBPv0MdU2t5GOcQhP+3zA== +"@types/react-dom@17.0.5": + version "17.0.5" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.5.tgz#df44eed5b8d9e0b13bb0cd38e0ea6572a1231227" + integrity sha512-ikqukEhH4H9gr4iJCmQVNzTB307kROe3XFfHAOTxOXPOw7lAoEXnM5KWTkzeANGL5Ce6ABfiMl/zJBYNi7ObmQ== dependencies: "@types/react" "*" From b3bb4b75d61251d6170fdc5f4a74f95bbf7dbd71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 11:55:34 +0200 Subject: [PATCH 14/28] Bump @babel/preset-env from 7.14.1 to 7.14.2 (#1792) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.1 to 7.14.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-preset-env) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 229 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 141 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 4b16dfe23b..b3b416094f 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-object-rest-spread": "^7.13.8", "@babel/plugin-transform-spread": "^7.13.0", - "@babel/preset-env": "^7.14.1", + "@babel/preset-env": "^7.14.2", "@babel/preset-react": "^7.13.13", "@babel/preset-typescript": "^7.13.0", "@bazel/bazelisk": "^1.8.1", diff --git a/yarn.lock b/yarn.lock index 2b99572bfc..1ac06c9495 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,7 +16,7 @@ dependencies: "@babel/highlight" "^7.12.13" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.13.15", "@babel/compat-data@^7.13.8", "@babel/compat-data@^7.14.0": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.13.15", "@babel/compat-data@^7.14.0": version "7.14.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.0.tgz#a901128bce2ad02565df95e6ecbf195cf9465919" integrity sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q== @@ -51,6 +51,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.2.tgz#d5773e8b557d421fd6ce0d5efa5fd7fc22567c30" + integrity sha512-OnADYbKrffDVai5qcpkMxQ7caomHOoEwjkouqnN2QhydAjowFAZcsdecFIRUBdb+ZcruwYE4ythYmF1UBZU5xQ== + dependencies: + "@babel/types" "^7.14.2" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" @@ -66,7 +75,7 @@ "@babel/helper-explode-assignable-expression" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.13.16", "@babel/helper-compilation-targets@^7.13.8": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.13.16": version "7.13.16" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz#6e91dccf15e3f43e5556dffe32d860109887563c" integrity sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA== @@ -137,6 +146,15 @@ "@babel/template" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/helper-function-name@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz#397688b590760b6ef7725b5f0860c82427ebaac2" + integrity sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ== + dependencies: + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.14.2" + "@babel/helper-get-function-arity@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" @@ -194,6 +212,20 @@ "@babel/traverse" "^7.14.0" "@babel/types" "^7.14.0" +"@babel/helper-module-transforms@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz#ac1cc30ee47b945e3e0c4db12fa0c5389509dfe5" + integrity sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA== + dependencies: + "@babel/helper-module-imports" "^7.13.12" + "@babel/helper-replace-supers" "^7.13.12" + "@babel/helper-simple-access" "^7.13.12" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.14.0" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.14.2" + "@babel/types" "^7.14.2" + "@babel/helper-optimise-call-expression@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" @@ -304,6 +336,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.0.tgz#2f0ebfed92bcddcc8395b91f1895191ce2760380" integrity sha512-AHbfoxesfBALg33idaTBVUkLnfXtsgvJREf93p4p0Lwsz4ppfE7g1tpEXVm4vrxUcH4DVhAa9Z1m1zqf9WUC7Q== +"@babel/parser@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.2.tgz#0c1680aa44ad4605b16cbdcc5c341a61bde9c746" + integrity sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ== + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz#a3484d84d0b549f3fc916b99ee4783f26fabad2a" @@ -313,10 +350,10 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" "@babel/plugin-proposal-optional-chaining" "^7.13.12" -"@babel/plugin-proposal-async-generator-functions@^7.13.15": - version "7.13.15" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz#80e549df273a3b3050431b148c892491df1bcc5b" - integrity sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA== +"@babel/plugin-proposal-async-generator-functions@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.2.tgz#3a2085abbf5d5f962d480dbc81347385ed62eb1e" + integrity sha512-b1AM4F6fwck4N8ItZ/AtC4FP/cqZqmKRQ4FaTDutwSYyjuhtvsGEMLK4N/ztV/ImP40BjIDyMgBQAeAMsQYVFQ== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/helper-remap-async-to-generator" "^7.13.0" @@ -338,77 +375,77 @@ "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-class-static-block" "^7.12.13" -"@babel/plugin-proposal-dynamic-import@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz#876a1f6966e1dec332e8c9451afda3bebcdf2e1d" - integrity sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ== +"@babel/plugin-proposal-dynamic-import@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.2.tgz#01ebabd7c381cff231fa43e302939a9de5be9d9f" + integrity sha512-oxVQZIWFh91vuNEMKltqNsKLFWkOIyJc95k2Gv9lWVyDfPUQGSSlbDEgWuJUU1afGE9WwlzpucMZ3yDRHIItkA== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz#393be47a4acd03fa2af6e3cde9b06e33de1b446d" - integrity sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw== +"@babel/plugin-proposal-export-namespace-from@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.2.tgz#62542f94aa9ce8f6dba79eec698af22112253791" + integrity sha512-sRxW3z3Zp3pFfLAgVEvzTFutTXax837oOatUIvSG9o5gRj9mKwm3br1Se5f4QalTQs9x4AzlA/HrCWbQIHASUQ== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz#bf1fb362547075afda3634ed31571c5901afef7b" - integrity sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q== +"@babel/plugin-proposal-json-strings@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.2.tgz#830b4e2426a782e8b2878fbfe2cba85b70cbf98c" + integrity sha512-w2DtsfXBBJddJacXMBhElGEYqCZQqN99Se1qeYn8DVLB33owlrlLftIbMzn5nz1OITfDVknXF433tBrLEAOEjA== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz#93fa78d63857c40ce3c8c3315220fd00bfbb4e1a" - integrity sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A== +"@babel/plugin-proposal-logical-assignment-operators@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.2.tgz#222348c080a1678e0e74ea63fe76f275882d1fd7" + integrity sha512-1JAZtUrqYyGsS7IDmFeaem+/LJqujfLZ2weLR9ugB0ufUPjzf8cguyVT1g5im7f7RXxuLq1xUxEzvm68uYRtGg== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz#3730a31dafd3c10d8ccd10648ed80a2ac5472ef3" - integrity sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A== +"@babel/plugin-proposal-nullish-coalescing-operator@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.2.tgz#425b11dc62fc26939a2ab42cbba680bdf5734546" + integrity sha512-ebR0zU9OvI2N4qiAC38KIAK75KItpIPTpAtd2r4OZmMFeKbKJpUFLYP2EuDut82+BmYi8sz42B+TfTptJ9iG5Q== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz#bd9da3188e787b5120b4f9d465a8261ce67ed1db" - integrity sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w== +"@babel/plugin-proposal-numeric-separator@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.2.tgz#82b4cc06571143faf50626104b335dd71baa4f9e" + integrity sha512-DcTQY9syxu9BpU3Uo94fjCB3LN9/hgPS8oUL7KrSW3bA2ePrKZZPJcc5y0hoJAM9dft3pGfErtEUvxXQcfLxUg== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz#5d210a4d727d6ce3b18f9de82cc99a3964eed60a" - integrity sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g== +"@babel/plugin-proposal-object-rest-spread@^7.13.8", "@babel/plugin-proposal-object-rest-spread@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.2.tgz#e17d418f81cc103fedd4ce037e181c8056225abc" + integrity sha512-hBIQFxwZi8GIp934+nj5uV31mqclC1aYDhctDu5khTi9PCCUOczyy0b34W0oE9U/eJXiqQaKyVsmjeagOaSlbw== dependencies: - "@babel/compat-data" "^7.13.8" - "@babel/helper-compilation-targets" "^7.13.8" + "@babel/compat-data" "^7.14.0" + "@babel/helper-compilation-targets" "^7.13.16" "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.13.0" + "@babel/plugin-transform-parameters" "^7.14.2" -"@babel/plugin-proposal-optional-catch-binding@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz#3ad6bd5901506ea996fc31bdcf3ccfa2bed71107" - integrity sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA== +"@babel/plugin-proposal-optional-catch-binding@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.2.tgz#150d4e58e525b16a9a1431bd5326c4eed870d717" + integrity sha512-XtkJsmJtBaUbOxZsNk0Fvrv8eiqgneug0A6aqLFZ4TSkar2L5dSXWcnUKHgmjJt49pyB/6ZHvkr3dPgl9MOWRQ== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.13.12": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz#ba9feb601d422e0adea6760c2bd6bbb7bfec4866" - integrity sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ== +"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.2.tgz#df8171a8b9c43ebf4c1dabe6311b432d83e1b34e" + integrity sha512-qQByMRPwMZJainfig10BoaDldx/+VDtNcrA7qdNaEOAj6VXud+gfrkA8j4CRAU5HjnWREXqIpSpH30qZX1xivA== dependencies: "@babel/helper-plugin-utils" "^7.13.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" @@ -575,23 +612,23 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-block-scoping@^7.14.1": - version "7.14.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.1.tgz#ac1b3a8e3d8cbb31efc6b9be2f74eb9823b74ab2" - integrity sha512-2mQXd0zBrwfp0O1moWIhPpEeTKDvxyHcnma3JATVP1l+CctWBuot6OJG8LQ4DnBj4ZZPSmlb/fm4mu47EOAnVA== +"@babel/plugin-transform-block-scoping@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.2.tgz#761cb12ab5a88d640ad4af4aa81f820e6b5fdf5c" + integrity sha512-neZZcP19NugZZqNwMTH+KoBjx5WyvESPSIOQb4JHpfd+zPfqcH65RMu5xJju5+6q/Y2VzYrleQTr+b6METyyxg== dependencies: "@babel/helper-plugin-utils" "^7.13.0" -"@babel/plugin-transform-classes@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz#0265155075c42918bf4d3a4053134176ad9b533b" - integrity sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g== +"@babel/plugin-transform-classes@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.2.tgz#3f1196c5709f064c252ad056207d87b7aeb2d03d" + integrity sha512-7oafAVcucHquA/VZCsXv/gmuiHeYd64UJyyTYU+MPfNu0KeNlxw06IeENBO8bJjXVbolu+j1MM5aKQtH1OMCNg== dependencies: "@babel/helper-annotate-as-pure" "^7.12.13" - "@babel/helper-function-name" "^7.12.13" + "@babel/helper-function-name" "^7.14.2" "@babel/helper-optimise-call-expression" "^7.12.13" "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-replace-supers" "^7.13.12" "@babel/helper-split-export-declaration" "^7.12.13" globals "^11.1.0" @@ -661,12 +698,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-modules-amd@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.0.tgz#589494b5b290ff76cf7f59c798011f6d77026553" - integrity sha512-CF4c5LX4LQ03LebQxJ5JZes2OYjzBuk1TdiF7cG7d5dK4lAdw9NZmaxq5K/mouUdNeqwz3TNjnW6v01UqUNgpQ== +"@babel/plugin-transform-modules-amd@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.2.tgz#6622806fe1a7c07a1388444222ef9535f2ca17b0" + integrity sha512-hPC6XBswt8P3G2D1tSV2HzdKvkqOpmbyoy+g73JG0qlF/qx2y3KaMmXb1fLrpmWGLZYA0ojCvaHdzFWjlmV+Pw== dependencies: - "@babel/helper-module-transforms" "^7.14.0" + "@babel/helper-module-transforms" "^7.14.2" "@babel/helper-plugin-utils" "^7.13.0" babel-plugin-dynamic-import-node "^2.3.3" @@ -721,10 +758,10 @@ "@babel/helper-plugin-utils" "^7.12.13" "@babel/helper-replace-supers" "^7.12.13" -"@babel/plugin-transform-parameters@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz#8fa7603e3097f9c0b7ca1a4821bc2fb52e9e5007" - integrity sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw== +"@babel/plugin-transform-parameters@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.2.tgz#e4290f72e0e9e831000d066427c4667098decc31" + integrity sha512-NxoVmA3APNCC1JdMXkdYXuQS+EMdqy0vIwyDHeKHiJKRxmp1qGSdb0JLEIoPRhkx6H/8Qi3RJ3uqOCYw8giy9A== dependencies: "@babel/helper-plugin-utils" "^7.13.0" @@ -860,28 +897,28 @@ "@babel/helper-create-regexp-features-plugin" "^7.12.13" "@babel/helper-plugin-utils" "^7.12.13" -"@babel/preset-env@^7.12.1", "@babel/preset-env@^7.14.1": - version "7.14.1" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.1.tgz#b55914e2e68885ea03f69600b2d3537e54574a93" - integrity sha512-0M4yL1l7V4l+j/UHvxcdvNfLB9pPtIooHTbEhgD/6UGyh8Hy3Bm1Mj0buzjDXATCSz3JFibVdnoJZCrlUCanrQ== +"@babel/preset-env@^7.12.1", "@babel/preset-env@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.2.tgz#e80612965da73579c84ad2f963c2359c71524ed5" + integrity sha512-7dD7lVT8GMrE73v4lvDEb85cgcQhdES91BSD7jS/xjC6QY8PnRhux35ac+GCpbiRhp8crexBvZZqnaL6VrY8TQ== dependencies: "@babel/compat-data" "^7.14.0" "@babel/helper-compilation-targets" "^7.13.16" "@babel/helper-plugin-utils" "^7.13.0" "@babel/helper-validator-option" "^7.12.17" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.13.12" - "@babel/plugin-proposal-async-generator-functions" "^7.13.15" + "@babel/plugin-proposal-async-generator-functions" "^7.14.2" "@babel/plugin-proposal-class-properties" "^7.13.0" "@babel/plugin-proposal-class-static-block" "^7.13.11" - "@babel/plugin-proposal-dynamic-import" "^7.13.8" - "@babel/plugin-proposal-export-namespace-from" "^7.12.13" - "@babel/plugin-proposal-json-strings" "^7.13.8" - "@babel/plugin-proposal-logical-assignment-operators" "^7.13.8" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" - "@babel/plugin-proposal-numeric-separator" "^7.12.13" - "@babel/plugin-proposal-object-rest-spread" "^7.13.8" - "@babel/plugin-proposal-optional-catch-binding" "^7.13.8" - "@babel/plugin-proposal-optional-chaining" "^7.13.12" + "@babel/plugin-proposal-dynamic-import" "^7.14.2" + "@babel/plugin-proposal-export-namespace-from" "^7.14.2" + "@babel/plugin-proposal-json-strings" "^7.14.2" + "@babel/plugin-proposal-logical-assignment-operators" "^7.14.2" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.2" + "@babel/plugin-proposal-numeric-separator" "^7.14.2" + "@babel/plugin-proposal-object-rest-spread" "^7.14.2" + "@babel/plugin-proposal-optional-catch-binding" "^7.14.2" + "@babel/plugin-proposal-optional-chaining" "^7.14.2" "@babel/plugin-proposal-private-methods" "^7.13.0" "@babel/plugin-proposal-private-property-in-object" "^7.14.0" "@babel/plugin-proposal-unicode-property-regex" "^7.12.13" @@ -902,8 +939,8 @@ "@babel/plugin-transform-arrow-functions" "^7.13.0" "@babel/plugin-transform-async-to-generator" "^7.13.0" "@babel/plugin-transform-block-scoped-functions" "^7.12.13" - "@babel/plugin-transform-block-scoping" "^7.14.1" - "@babel/plugin-transform-classes" "^7.13.0" + "@babel/plugin-transform-block-scoping" "^7.14.2" + "@babel/plugin-transform-classes" "^7.14.2" "@babel/plugin-transform-computed-properties" "^7.13.0" "@babel/plugin-transform-destructuring" "^7.13.17" "@babel/plugin-transform-dotall-regex" "^7.12.13" @@ -913,14 +950,14 @@ "@babel/plugin-transform-function-name" "^7.12.13" "@babel/plugin-transform-literals" "^7.12.13" "@babel/plugin-transform-member-expression-literals" "^7.12.13" - "@babel/plugin-transform-modules-amd" "^7.14.0" + "@babel/plugin-transform-modules-amd" "^7.14.2" "@babel/plugin-transform-modules-commonjs" "^7.14.0" "@babel/plugin-transform-modules-systemjs" "^7.13.8" "@babel/plugin-transform-modules-umd" "^7.14.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.12.13" "@babel/plugin-transform-new-target" "^7.12.13" "@babel/plugin-transform-object-super" "^7.12.13" - "@babel/plugin-transform-parameters" "^7.13.0" + "@babel/plugin-transform-parameters" "^7.14.2" "@babel/plugin-transform-property-literals" "^7.12.13" "@babel/plugin-transform-regenerator" "^7.13.15" "@babel/plugin-transform-reserved-words" "^7.12.13" @@ -932,7 +969,7 @@ "@babel/plugin-transform-unicode-escapes" "^7.12.13" "@babel/plugin-transform-unicode-regex" "^7.12.13" "@babel/preset-modules" "^0.1.4" - "@babel/types" "^7.14.1" + "@babel/types" "^7.14.2" babel-plugin-polyfill-corejs2 "^0.2.0" babel-plugin-polyfill-corejs3 "^0.2.0" babel-plugin-polyfill-regenerator "^0.2.0" @@ -1012,10 +1049,24 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.12.6", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.1", "@babel/types@^7.4.4": - version "7.14.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.1.tgz#095bd12f1c08ab63eff6e8f7745fa7c9cc15a9db" - integrity sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA== +"@babel/traverse@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.2.tgz#9201a8d912723a831c2679c7ebbf2fe1416d765b" + integrity sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.14.2" + "@babel/helper-function-name" "^7.14.2" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.14.2" + "@babel/types" "^7.14.2" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.12.6", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.4.4": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.2.tgz#4208ae003107ef8a057ea8333e56eb64d2f6a2c3" + integrity sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw== dependencies: "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" From b8791ba7227960213e26a2f8601960d217377f6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 13:16:22 +0200 Subject: [PATCH 15/28] Bump sass-loader from 11.0.1 to 11.1.1 (#1790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump sass-loader from 11.0.1 to 11.1.1 Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 11.0.1 to 11.1.1. - [Release notes](https://github.com/webpack-contrib/sass-loader/releases) - [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/sass-loader/compare/v11.0.1...v11.1.1) Signed-off-by: dependabot[bot] * update package.json Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christoph Pröschel --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b3b416094f..ffbf9d5656 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "prettier": "^2.3.0", "react-hot-loader": "^4.13.0", "sass": "^1.32.12", - "sass-loader": "^11", + "sass-loader": "^11.1.1", "style-loader": "^2.0.0", "terser-webpack-plugin": "^5.1.1", "typescript": "4.2.4", diff --git a/yarn.lock b/yarn.lock index 1ac06c9495..d79d22b125 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6585,10 +6585,10 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@^11: - version "11.0.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-11.0.1.tgz#8672f896593466573b904f47693e0695368e38c9" - integrity sha512-Vp1LcP4slTsTNLEiDkTcm8zGN/XYYrZz2BZybQbliWA8eXveqA/AxsEjllQTpJbg2MzCsx/qNO48sHdZtOaxTw== +sass-loader@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-11.1.1.tgz#0db441bbbe197b2af96125bebb7f4be6476b13a7" + integrity sha512-fOCp/zLmj1V1WHDZbUbPgrZhA7HKXHEqkslzB+05U5K9SbSbcmH91C7QLW31AsXikxUMaxXRhhcqWZAxUMLDyA== dependencies: klona "^2.0.4" neo-async "^2.6.2" From a29dbe90086d318808cf988162141cfc9d2cb167 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 13:42:30 +0200 Subject: [PATCH 16/28] Bump cypress from 7.2.0 to 7.3.0 (#1780) Bumps [cypress](https://github.com/cypress-io/cypress) from 7.2.0 to 7.3.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v7.2.0...v7.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ffbf9d5656..8e85edc565 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "babel-loader": "^8.0.6", "copy-webpack-plugin": "^8.1.1", "css-loader": "^5.2.4", - "cypress": "^7.2.0", + "cypress": "^7.3.0", "eslint": "^7.26.0", "eslint-plugin-react": "^7.23.2", "file-loader": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index d79d22b125..6b80768998 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2869,10 +2869,10 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.7.tgz#2a5fb75e1015e84dd15692f71e89a1450290950b" integrity sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g== -cypress@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.2.0.tgz#6a3364e18972f898fff1fb12c1ff747939e45ddc" - integrity sha512-lHHGay+YsffDn4M0bkkwezylBVHUpwwhtqte4LNPrFRCHy77X38+1PUe3neFb3glVTM+rbILtTN6FhO2djcOuQ== +cypress@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.3.0.tgz#17345b8d18681c120f033e7d8fd0f0271e9d0d51" + integrity sha512-aseRCH1tRVCrM6oEfja6fR/bo5l6e4SkHRRSATh27UeN4f/ANC8U7tGIulmrISJVy9xuOkOdbYKbUb2MNM+nrw== dependencies: "@cypress/listr-verbose-renderer" "^0.4.1" "@cypress/request" "^2.88.5" From 0240ee1accb71d4a81831fc5e1eb69a0820e81dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 13:54:37 +0200 Subject: [PATCH 17/28] Bump @babel/core from 7.14.0 to 7.14.2 (#1794) Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.0 to 7.14.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-core) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 66 ++++++++++------------------------------------------ 2 files changed, 13 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 8e85edc565..f93c647a76 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "typesafe-actions": "^5.1.0" }, "devDependencies": { - "@babel/core": "7.14.0", + "@babel/core": "7.14.2", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-object-rest-spread": "^7.13.8", "@babel/plugin-transform-spread": "^7.13.0", diff --git a/yarn.lock b/yarn.lock index 6b80768998..ae5bebaa09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,20 +21,20 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.0.tgz#a901128bce2ad02565df95e6ecbf195cf9465919" integrity sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q== -"@babel/core@7.14.0", "@babel/core@^7.12.3": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.0.tgz#47299ff3ec8d111b493f1a9d04bf88c04e728d88" - integrity sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw== +"@babel/core@7.14.2", "@babel/core@^7.12.3": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.2.tgz#54e45334ffc0172048e5c93ded36461d3ad4c417" + integrity sha512-OgC1mON+l4U4B4wiohJlQNUU3H73mpTyYY3j/c8U9dr9UagGGSm+WFpzjy/YLdoyjiG++c1kIDgxCo/mLwQJeQ== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.14.0" + "@babel/generator" "^7.14.2" "@babel/helper-compilation-targets" "^7.13.16" - "@babel/helper-module-transforms" "^7.14.0" + "@babel/helper-module-transforms" "^7.14.2" "@babel/helpers" "^7.14.0" - "@babel/parser" "^7.14.0" + "@babel/parser" "^7.14.2" "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.14.0" + "@babel/traverse" "^7.14.2" + "@babel/types" "^7.14.2" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -42,15 +42,6 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.0.tgz#0f35d663506c43e4f10898fbda0d752ec75494be" - integrity sha512-C6u00HbmsrNPug6A+CiNl8rEys7TsdcXwg12BHi2ca5rUfAs3+UwZsuDQSXnc+wCElCXMB8gMaJ3YXDdh8fAlg== - dependencies: - "@babel/types" "^7.14.0" - jsesc "^2.5.1" - source-map "^0.5.0" - "@babel/generator@^7.14.2": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.2.tgz#d5773e8b557d421fd6ce0d5efa5fd7fc22567c30" @@ -198,21 +189,7 @@ dependencies: "@babel/types" "^7.13.12" -"@babel/helper-module-transforms@^7.13.0", "@babel/helper-module-transforms@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz#8fcf78be220156f22633ee204ea81f73f826a8ad" - integrity sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw== - dependencies: - "@babel/helper-module-imports" "^7.13.12" - "@babel/helper-replace-supers" "^7.13.12" - "@babel/helper-simple-access" "^7.13.12" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.14.0" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.14.0" - -"@babel/helper-module-transforms@^7.14.2": +"@babel/helper-module-transforms@^7.13.0", "@babel/helper-module-transforms@^7.14.0", "@babel/helper-module-transforms@^7.14.2": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz#ac1cc30ee47b945e3e0c4db12fa0c5389509dfe5" integrity sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA== @@ -331,12 +308,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.13", "@babel/parser@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.0.tgz#2f0ebfed92bcddcc8395b91f1895191ce2760380" - integrity sha512-AHbfoxesfBALg33idaTBVUkLnfXtsgvJREf93p4p0Lwsz4ppfE7g1tpEXVm4vrxUcH4DVhAa9Z1m1zqf9WUC7Q== - -"@babel/parser@^7.14.2": +"@babel/parser@^7.12.13", "@babel/parser@^7.14.2": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.2.tgz#0c1680aa44ad4605b16cbdcc5c341a61bde9c746" integrity sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ== @@ -1035,21 +1007,7 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.0.tgz#cea0dc8ae7e2b1dec65f512f39f3483e8cc95aef" - integrity sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.14.0" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.14.0" - "@babel/types" "^7.14.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.14.2": +"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.14.2": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.2.tgz#9201a8d912723a831c2679c7ebbf2fe1416d765b" integrity sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA== From d7cbc3a9119fc19c65678d7648ba6c6130f21348 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 13:55:01 +0200 Subject: [PATCH 18/28] Bump @typescript-eslint/parser from 4.22.1 to 4.23.0 (#1779) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.22.1 to 4.23.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.23.0/packages/parser) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 50 ++++++++------------------------------------------ 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index f93c647a76..d42c446c1d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@types/react-window-infinite-loader": "^1.0.3", "@types/resize-observer-browser": "^0.1.5", "@typescript-eslint/eslint-plugin": "^4.23.0", - "@typescript-eslint/parser": "^4.22.1", + "@typescript-eslint/parser": "^4.23.0", "babel-loader": "^8.0.6", "copy-webpack-plugin": "^8.1.1", "css-loader": "^5.2.4", diff --git a/yarn.lock b/yarn.lock index ae5bebaa09..1dde37d365 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1551,23 +1551,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.1.tgz#a95bda0fd01d994a15fc3e99dc984294f25c19cc" - integrity sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw== - dependencies: - "@typescript-eslint/scope-manager" "4.22.1" - "@typescript-eslint/types" "4.22.1" - "@typescript-eslint/typescript-estree" "4.22.1" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz#5bb357f94f9cd8b94e6be43dd637eb73b8f355b4" - integrity sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g== +"@typescript-eslint/parser@^4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.23.0.tgz#239315d38e42e852bef43a4b0b01bef78f78911c" + integrity sha512-wsvjksHBMOqySy/Pi2Q6UuIuHYbgAMwLczRl4YanEPKW5KVxI9ZzDYh3B5DtcZPQTGRWFJrfcbJ6L01Leybwug== dependencies: - "@typescript-eslint/types" "4.22.1" - "@typescript-eslint/visitor-keys" "4.22.1" + "@typescript-eslint/scope-manager" "4.23.0" + "@typescript-eslint/types" "4.23.0" + "@typescript-eslint/typescript-estree" "4.23.0" + debug "^4.1.1" "@typescript-eslint/scope-manager@4.23.0": version "4.23.0" @@ -1577,29 +1569,11 @@ "@typescript-eslint/types" "4.23.0" "@typescript-eslint/visitor-keys" "4.23.0" -"@typescript-eslint/types@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.1.tgz#bf99c6cec0b4a23d53a61894816927f2adad856a" - integrity sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw== - "@typescript-eslint/types@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== -"@typescript-eslint/typescript-estree@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz#dca379eead8cdfd4edc04805e83af6d148c164f9" - integrity sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A== - dependencies: - "@typescript-eslint/types" "4.22.1" - "@typescript-eslint/visitor-keys" "4.22.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz#0753b292097523852428a6f5a1aa8ccc1aae6cd9" @@ -1613,14 +1587,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz#6045ae25a11662c671f90b3a403d682dfca0b7a6" - integrity sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ== - dependencies: - "@typescript-eslint/types" "4.22.1" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz#7215cc977bd3b4ef22467b9023594e32f9e4e455" From 2f15214c8209dd47a911ce5281ffdcda822f6849 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 13:58:05 +0200 Subject: [PATCH 19/28] Bump terser-webpack-plugin from 5.1.1 to 5.1.2 (#1795) Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases) - [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.1...v5.1.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index d42c446c1d..7a99ee5335 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "sass": "^1.32.12", "sass-loader": "^11.1.1", "style-loader": "^2.0.0", - "terser-webpack-plugin": "^5.1.1", + "terser-webpack-plugin": "^5.1.2", "typescript": "4.2.4", "url-loader": "^4.1.1", "webpack": "^5.37.0", diff --git a/yarn.lock b/yarn.lock index 1dde37d365..7aec761f20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7144,17 +7144,17 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -terser-webpack-plugin@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" - integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== +terser-webpack-plugin@^5.1.1, terser-webpack-plugin@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.2.tgz#51d295eb7cc56785a67a372575fdc46e42d5c20c" + integrity sha512-6QhDaAiVHIQr5Ab3XUWZyDmrIPCHMiqJVljMF91YKyqwKkL5QHnYMkrMBy96v9Z7ev1hGhSEw1HQZc2p/s5Z8Q== dependencies: jest-worker "^26.6.2" p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" source-map "^0.6.1" - terser "^5.5.1" + terser "^5.7.0" terser@^4.6.3: version "4.8.0" @@ -7165,10 +7165,10 @@ terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.5.1: - version "5.6.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.6.1.tgz#a48eeac5300c0a09b36854bf90d9c26fb201973c" - integrity sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw== +terser@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693" + integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g== dependencies: commander "^2.20.0" source-map "~0.7.2" From f3252604d7be67c4bb269b216942f1cb16ba83af Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Mon, 17 May 2021 14:23:36 +0200 Subject: [PATCH 20/28] [#1743] Permit public auth pages (#1786) * [#1743] Permit public auth pages * 403 for all non-authentication routes * fix test --- .../java/co/airy/spring/auth/AuthConfig.java | 26 ++++++++++++++++--- .../java/co/airy/spring/auth/OidcTest.java | 12 ++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java index a8b7afc209..e794db20b1 100644 --- a/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java +++ b/lib/java/spring/auth/src/main/java/co/airy/spring/auth/AuthConfig.java @@ -13,6 +13,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; +import org.springframework.security.access.AccessDeniedException; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; @@ -20,14 +21,27 @@ import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.AuthenticationException; import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.security.web.access.AccessDeniedHandler; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; +import org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint; +import org.springframework.security.web.authentication.Http403ForbiddenEntryPoint; +import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint; +import org.springframework.security.web.util.matcher.AndRequestMatcher; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.NegatedRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.Arrays; +import java.util.LinkedHashMap; import java.util.List; @Configuration @@ -69,7 +83,7 @@ protected void configure(final HttpSecurity http) throws Exception { if (systemToken != null || configProvider.isPresent()) { http.authorizeRequests(authorize -> authorize - .antMatchers("/actuator/**").permitAll() + .antMatchers("/actuator/**", "/login/**", "/logout/**", "/oauth/**").permitAll() .antMatchers(ignoreAuthPatterns).permitAll() .anyRequest().authenticated() ); @@ -81,13 +95,19 @@ protected void configure(final HttpSecurity http) throws Exception { if (configProvider.isPresent()) { log.info("Oidc auth enabled with provider: {}", configProvider.getRegistration().getRegistrationId()); + http .securityContext().securityContextRepository(new CookieSecurityContextRepository(new Jwt(jwtSecret))) .and().logout().permitAll().deleteCookies(AuthCookie.NAME) .and() - .oauth2Login(oauth2 -> oauth2 - .defaultSuccessUrl("/ui/")) + .oauth2Login(oauth2 -> oauth2.defaultSuccessUrl("/ui/")) .addFilterAfter(new EmailFilter(configProvider), OAuth2LoginAuthenticationFilter.class); + + // By default oauth2Login creates an authentication entrypoint that redirects clients to the + // login form. For API clients we instead want to return a 403. + http.exceptionHandling().defaultAuthenticationEntryPointFor(new Http403ForbiddenEntryPoint(), + new NegatedRequestMatcher(new OrRequestMatcher(new AntPathRequestMatcher("/login/**"), + new AntPathRequestMatcher("/logout/**"), new AntPathRequestMatcher("/oauth/**")))); } } } diff --git a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java index 6da7caea98..a2f649a97c 100644 --- a/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java +++ b/lib/java/spring/auth/src/test/java/co/airy/spring/auth/OidcTest.java @@ -11,8 +11,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; + import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -34,11 +35,16 @@ public class OidcTest { @Test void redirectsToAuth() throws Exception { mvc.perform(post("/principal.get")) - .andExpect(status().is3xxRedirection()) - .andExpect(header().exists("Location")) + .andExpect(status().isForbidden()) .andExpect(jsonPath("$").doesNotExist()); } + @Test + void servesLoginPage() throws Exception { + mvc.perform(get("/login")) + .andExpect(status().isOk()); + } + @Test void systemTokenAuthStillWorks() throws Exception { mvc.perform(post("/principal.get") From 9ae6e402ae4d5b614f3dce0a480b6d25b7ad3ac5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 15:29:40 +0200 Subject: [PATCH 21/28] Bump @types/node from 15.0.2 to 15.3.0 (#1796) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.0.2 to 15.3.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7a99ee5335..1414d281cf 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@crello/react-lottie": "^0.0.11", "@reduxjs/toolkit": "^1.5.1", "@stomp/stompjs": "^6.1.0", - "@types/node": "15.0.2", + "@types/node": "15.3.0", "@types/react": "17.0.5", "@types/react-dom": "17.0.5", "@types/react-redux": "7.1.16", diff --git a/yarn.lock b/yarn.lock index 7aec761f20..e37b186f23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1412,10 +1412,10 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== -"@types/node@*", "@types/node@15.0.2": - version "15.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.2.tgz#51e9c0920d1b45936ea04341aa3e2e58d339fb67" - integrity sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA== +"@types/node@*", "@types/node@15.3.0": + version "15.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26" + integrity sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ== "@types/node@^10.1.0": version "10.17.55" From 5dbf065ccd78cb93a9dc7459abde759201eb996d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 15:30:03 +0200 Subject: [PATCH 22/28] Bump @bazel/typescript from 3.4.2 to 3.5.0 (#1776) Bumps [@bazel/typescript](https://github.com/bazelbuild/rules_nodejs/tree/HEAD/packages/typescript) from 3.4.2 to 3.5.0. - [Release notes](https://github.com/bazelbuild/rules_nodejs/releases) - [Changelog](https://github.com/bazelbuild/rules_nodejs/blob/stable/CHANGELOG.md) - [Commits](https://github.com/bazelbuild/rules_nodejs/commits/3.5.0/packages/typescript) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1414d281cf..04b7dce529 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@babel/preset-react": "^7.13.13", "@babel/preset-typescript": "^7.13.0", "@bazel/bazelisk": "^1.8.1", - "@bazel/typescript": "^3.4.2", + "@bazel/typescript": "^3.5.0", "@svgr/webpack": "^5.5.0", "@types/lodash-es": "^4.17.4", "@types/react-window-infinite-loader": "^1.0.3", diff --git a/yarn.lock b/yarn.lock index e37b186f23..07787c0bb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1034,10 +1034,10 @@ resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.8.1.tgz#b4f1b21c3cf2147bcad1ef9242c50095c5f1ad06" integrity sha512-hD+93iN6sIiWqLdtikx7bRVScLp51Hn/gYGt7z8xFZAhl7TznC9opDe3gQvT7fwRWzgDkk6dtmJiNXlHVsv72g== -"@bazel/typescript@^3.4.2": - version "3.4.2" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.4.2.tgz#183cb14d1f4149cc67ed2723c4b8a7366da5ec36" - integrity sha512-JtLdPOC7rytALJBxawxTCnxVopGstk2eXFs56zHBy+JWSeqrnwujeWZyK5qZHzpag02/JtIQ/ZKkM/DQtrXC8Q== +"@bazel/typescript@^3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.5.0.tgz#605493f4f0a5297df8a7fcccb86a1a80ea2090bb" + integrity sha512-BtGFp4nYFkQTmnONCzomk7dkmOwaINBL3piq+lykBlcc6UxLe9iCAnZpOyPypB1ReN3k3SRNAa53x6oGScQxMg== dependencies: protobufjs "6.8.8" semver "5.6.0" From c67acdf64eadfb838d5fcb698e7b102090acdd5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 15:30:14 +0200 Subject: [PATCH 23/28] Bump sass from 1.32.12 to 1.32.13 (#1793) Bumps [sass](https://github.com/sass/dart-sass) from 1.32.12 to 1.32.13. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.32.12...1.32.13) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 04b7dce529..42d7625d53 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "minimist": "^1.2.5", "prettier": "^2.3.0", "react-hot-loader": "^4.13.0", - "sass": "^1.32.12", + "sass": "^1.32.13", "sass-loader": "^11.1.1", "style-loader": "^2.0.0", "terser-webpack-plugin": "^5.1.2", diff --git a/yarn.lock b/yarn.lock index 07787c0bb2..9bcc7cdec6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6517,10 +6517,10 @@ sass-loader@^11.1.1: klona "^2.0.4" neo-async "^2.6.2" -sass@^1.32.12: - version "1.32.12" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.12.tgz#a2a47ad0f1c168222db5206444a30c12457abb9f" - integrity sha512-zmXn03k3hN0KaiVTjohgkg98C3UowhL1/VSGdj4/VAAiMKGQOE80PFPxFP2Kyq0OUskPKcY5lImkhBKEHlypJA== +sass@^1.32.13: + version "1.32.13" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.13.tgz#8d29c849e625a415bce71609c7cf95e15f74ed00" + integrity sha512-dEgI9nShraqP7cXQH+lEXVf73WOPCse0QlFzSD8k+1TcOxCMwVXfQlr0jtoluZysQOyJGnfr21dLvYKDJq8HkA== dependencies: chokidar ">=3.0.0 <4.0.0" From 214808304a93a56f5bcbd8f70f77e8ed8758056a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 10:48:09 +0200 Subject: [PATCH 24/28] Bump @typescript-eslint/eslint-plugin from 4.23.0 to 4.24.0 (#1803) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.23.0 to 4.24.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.24.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 60 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 42d7625d53..8162b6cd22 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/lodash-es": "^4.17.4", "@types/react-window-infinite-loader": "^1.0.3", "@types/resize-observer-browser": "^0.1.5", - "@typescript-eslint/eslint-plugin": "^4.23.0", + "@typescript-eslint/eslint-plugin": "^4.24.0", "@typescript-eslint/parser": "^4.23.0", "babel-loader": "^8.0.6", "copy-webpack-plugin": "^8.1.1", diff --git a/yarn.lock b/yarn.lock index 9bcc7cdec6..69e2f3673b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1525,13 +1525,13 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== -"@typescript-eslint/eslint-plugin@^4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.23.0.tgz#29d3c9c81f6200b1fd6d8454cfb007ba176cde80" - integrity sha512-tGK1y3KIvdsQEEgq6xNn1DjiFJtl+wn8JJQiETtCbdQxw1vzjXyAaIkEmO2l6Nq24iy3uZBMFQjZ6ECf1QdgGw== +"@typescript-eslint/eslint-plugin@^4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.24.0.tgz#03801ffc25b2af9d08f3dc9bccfc0b7ce3780d0f" + integrity sha512-qbCgkPM7DWTsYQGjx9RTuQGswi+bEt0isqDBeo+CKV0953zqI0Tp7CZ7Fi9ipgFA6mcQqF4NOVNwS/f2r6xShw== dependencies: - "@typescript-eslint/experimental-utils" "4.23.0" - "@typescript-eslint/scope-manager" "4.23.0" + "@typescript-eslint/experimental-utils" "4.24.0" + "@typescript-eslint/scope-manager" "4.24.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -1539,15 +1539,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.23.0.tgz#f2059434cd6e5672bfeab2fb03b7c0a20622266f" - integrity sha512-WAFNiTDnQfrF3Z2fQ05nmCgPsO5o790vOhmWKXbbYQTO9erE1/YsFot5/LnOUizLzU2eeuz6+U/81KV5/hFTGA== +"@typescript-eslint/experimental-utils@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.24.0.tgz#c23ead9de44b99c3a5fd925c33a106b00165e172" + integrity sha512-IwTT2VNDKH1h8RZseMH4CcYBz6lTvRoOLDuuqNZZoThvfHEhOiZPQCow+5El3PtyxJ1iDr6UXZwYtE3yZQjhcw== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.23.0" - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/typescript-estree" "4.23.0" + "@typescript-eslint/scope-manager" "4.24.0" + "@typescript-eslint/types" "4.24.0" + "@typescript-eslint/typescript-estree" "4.24.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1569,11 +1569,24 @@ "@typescript-eslint/types" "4.23.0" "@typescript-eslint/visitor-keys" "4.23.0" +"@typescript-eslint/scope-manager@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.24.0.tgz#38088216f0eaf235fa30ed8cabf6948ec734f359" + integrity sha512-9+WYJGDnuC9VtYLqBhcSuM7du75fyCS/ypC8c5g7Sdw7pGL4NDTbeH38eJPfzIydCHZDoOgjloxSAA3+4l/zsA== + dependencies: + "@typescript-eslint/types" "4.24.0" + "@typescript-eslint/visitor-keys" "4.24.0" + "@typescript-eslint/types@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== +"@typescript-eslint/types@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.24.0.tgz#6d0cca2048cbda4e265e0c4db9c2a62aaad8228c" + integrity sha512-tkZUBgDQKdvfs8L47LaqxojKDE+mIUmOzdz7r+u+U54l3GDkTpEbQ1Jp3cNqqAU9vMUCBA1fitsIhm7yN0vx9Q== + "@typescript-eslint/typescript-estree@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz#0753b292097523852428a6f5a1aa8ccc1aae6cd9" @@ -1587,6 +1600,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.24.0.tgz#b49249679a98014d8b03e8d4b70864b950e3c90f" + integrity sha512-kBDitL/by/HK7g8CYLT7aKpAwlR8doshfWz8d71j97n5kUa5caHWvY0RvEUEanL/EqBJoANev8Xc/mQ6LLwXGA== + dependencies: + "@typescript-eslint/types" "4.24.0" + "@typescript-eslint/visitor-keys" "4.24.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/visitor-keys@4.23.0": version "4.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz#7215cc977bd3b4ef22467b9023594e32f9e4e455" @@ -1595,6 +1621,14 @@ "@typescript-eslint/types" "4.23.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.24.0.tgz#a8fafdc76cad4e04a681a945fbbac4e35e98e297" + integrity sha512-4ox1sjmGHIxjEDBnMCtWFFhErXtKA1Ec0sBpuz0fqf3P+g3JFGyTxxbF06byw0FRsPnnbq44cKivH7Ks1/0s6g== + dependencies: + "@typescript-eslint/types" "4.24.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" From 37446eae72d327537b554a48832a44efba15bbbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 10:48:37 +0200 Subject: [PATCH 25/28] Bump @babel/core from 7.14.2 to 7.14.3 (#1802) Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.2 to 7.14.3. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.3/packages/babel-core) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 8162b6cd22..7c0b75ff17 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "typesafe-actions": "^5.1.0" }, "devDependencies": { - "@babel/core": "7.14.2", + "@babel/core": "7.14.3", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-object-rest-spread": "^7.13.8", "@babel/plugin-transform-spread": "^7.13.0", diff --git a/yarn.lock b/yarn.lock index 69e2f3673b..87df70e082 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,17 +21,17 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.0.tgz#a901128bce2ad02565df95e6ecbf195cf9465919" integrity sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q== -"@babel/core@7.14.2", "@babel/core@^7.12.3": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.2.tgz#54e45334ffc0172048e5c93ded36461d3ad4c417" - integrity sha512-OgC1mON+l4U4B4wiohJlQNUU3H73mpTyYY3j/c8U9dr9UagGGSm+WFpzjy/YLdoyjiG++c1kIDgxCo/mLwQJeQ== +"@babel/core@7.14.3", "@babel/core@^7.12.3": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.3.tgz#5395e30405f0776067fbd9cf0884f15bfb770a38" + integrity sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.14.2" + "@babel/generator" "^7.14.3" "@babel/helper-compilation-targets" "^7.13.16" "@babel/helper-module-transforms" "^7.14.2" "@babel/helpers" "^7.14.0" - "@babel/parser" "^7.14.2" + "@babel/parser" "^7.14.3" "@babel/template" "^7.12.13" "@babel/traverse" "^7.14.2" "@babel/types" "^7.14.2" @@ -42,10 +42,10 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.2.tgz#d5773e8b557d421fd6ce0d5efa5fd7fc22567c30" - integrity sha512-OnADYbKrffDVai5qcpkMxQ7caomHOoEwjkouqnN2QhydAjowFAZcsdecFIRUBdb+ZcruwYE4ythYmF1UBZU5xQ== +"@babel/generator@^7.14.2", "@babel/generator@^7.14.3": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.3.tgz#0c2652d91f7bddab7cccc6ba8157e4f40dcedb91" + integrity sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA== dependencies: "@babel/types" "^7.14.2" jsesc "^2.5.1" @@ -308,10 +308,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.13", "@babel/parser@^7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.2.tgz#0c1680aa44ad4605b16cbdcc5c341a61bde9c746" - integrity sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ== +"@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298" + integrity sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ== "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12": version "7.13.12" From e470ea4ac71cccbf67509215d3bf7308de8e5990 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 11:22:29 +0200 Subject: [PATCH 26/28] Bump @typescript-eslint/parser from 4.23.0 to 4.24.0 (#1801) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.23.0 to 4.24.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.24.0/packages/parser) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 50 ++++++++------------------------------------------ 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index 7c0b75ff17..d62d7c156a 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@types/react-window-infinite-loader": "^1.0.3", "@types/resize-observer-browser": "^0.1.5", "@typescript-eslint/eslint-plugin": "^4.24.0", - "@typescript-eslint/parser": "^4.23.0", + "@typescript-eslint/parser": "^4.24.0", "babel-loader": "^8.0.6", "copy-webpack-plugin": "^8.1.1", "css-loader": "^5.2.4", diff --git a/yarn.lock b/yarn.lock index 87df70e082..f38e76f4c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1551,23 +1551,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.23.0.tgz#239315d38e42e852bef43a4b0b01bef78f78911c" - integrity sha512-wsvjksHBMOqySy/Pi2Q6UuIuHYbgAMwLczRl4YanEPKW5KVxI9ZzDYh3B5DtcZPQTGRWFJrfcbJ6L01Leybwug== - dependencies: - "@typescript-eslint/scope-manager" "4.23.0" - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/typescript-estree" "4.23.0" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.23.0.tgz#8792ef7eacac122e2ec8fa2d30a59b8d9a1f1ce4" - integrity sha512-ZZ21PCFxPhI3n0wuqEJK9omkw51wi2bmeKJvlRZPH5YFkcawKOuRMQMnI8mH6Vo0/DoHSeZJnHiIx84LmVQY+w== +"@typescript-eslint/parser@^4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.24.0.tgz#2e5f1cc78ffefe43bfac7e5659309a92b09a51bd" + integrity sha512-dj1ZIh/4QKeECLb2f/QjRwMmDArcwc2WorWPRlB8UNTZlY1KpTVsbX7e3ZZdphfRw29aTFUSNuGB8w9X5sS97w== dependencies: - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/visitor-keys" "4.23.0" + "@typescript-eslint/scope-manager" "4.24.0" + "@typescript-eslint/types" "4.24.0" + "@typescript-eslint/typescript-estree" "4.24.0" + debug "^4.1.1" "@typescript-eslint/scope-manager@4.24.0": version "4.24.0" @@ -1577,29 +1569,11 @@ "@typescript-eslint/types" "4.24.0" "@typescript-eslint/visitor-keys" "4.24.0" -"@typescript-eslint/types@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" - integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== - "@typescript-eslint/types@4.24.0": version "4.24.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.24.0.tgz#6d0cca2048cbda4e265e0c4db9c2a62aaad8228c" integrity sha512-tkZUBgDQKdvfs8L47LaqxojKDE+mIUmOzdz7r+u+U54l3GDkTpEbQ1Jp3cNqqAU9vMUCBA1fitsIhm7yN0vx9Q== -"@typescript-eslint/typescript-estree@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz#0753b292097523852428a6f5a1aa8ccc1aae6cd9" - integrity sha512-5Sty6zPEVZF5fbvrZczfmLCOcby3sfrSPu30qKoY1U3mca5/jvU5cwsPb/CO6Q3ByRjixTMIVsDkqwIxCf/dMw== - dependencies: - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/visitor-keys" "4.23.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.24.0": version "4.24.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.24.0.tgz#b49249679a98014d8b03e8d4b70864b950e3c90f" @@ -1613,14 +1587,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz#7215cc977bd3b4ef22467b9023594e32f9e4e455" - integrity sha512-5PNe5cmX9pSifit0H+nPoQBXdbNzi5tOEec+3riK+ku4e3er37pKxMKDH5Ct5Y4fhWxcD4spnlYjxi9vXbSpwg== - dependencies: - "@typescript-eslint/types" "4.23.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.24.0": version "4.24.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.24.0.tgz#a8fafdc76cad4e04a681a945fbbac4e35e98e297" From 5bf308aa13d57902e516d09a553bbf795a652beb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 11:39:02 +0200 Subject: [PATCH 27/28] Bump webpack-bundle-analyzer from 4.4.1 to 4.4.2 (#1800) Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.4.1 to 4.4.2. - [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases) - [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.4.1...v4.4.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d62d7c156a..0c64691b95 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "typescript": "4.2.4", "url-loader": "^4.1.1", "webpack": "^5.37.0", - "webpack-bundle-analyzer": "^4.4.1", + "webpack-bundle-analyzer": "^4.4.2", "webpack-cli": "^4.7.0", "webpack-dev-server": "^3.11.2" } diff --git a/yarn.lock b/yarn.lock index f38e76f4c7..a889f09528 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7620,10 +7620,10 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -webpack-bundle-analyzer@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.1.tgz#c71fb2eaffc10a4754d7303b224adb2342069da1" - integrity sha512-j5m7WgytCkiVBoOGavzNokBOqxe6Mma13X1asfVYtKWM3wxBiRRu1u1iG0Iol5+qp9WgyhkMmBAcvjEfJ2bdDw== +webpack-bundle-analyzer@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz#39898cf6200178240910d629705f0f3493f7d666" + integrity sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ== dependencies: acorn "^8.0.4" acorn-walk "^8.0.0" From cffc44055e205999140d9cafe2d05ca362260e02 Mon Sep 17 00:00:00 2001 From: ljupcovangelski Date: Tue, 18 May 2021 14:17:27 +0200 Subject: [PATCH 28/28] Fixes #1804 --- VERSION | 2 +- docs/docs/changelog.md | 53 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 885415662f..2157409059 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.21.0 +0.22.0 diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 086bd72977..64ece34d5b 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -3,18 +3,66 @@ title: Changelog sidebar_label: 📝 Changelog --- +## 0.22.0 + +#### 🚀 Features + +- [[#1743](https://github.com/airyhq/airy/issues/1743)] Return proper status code for unauthorized access [[#1785](https://github.com/airyhq/airy/pull/1785)] + +#### 🐛 Bug Fixes + +- [[#1743](https://github.com/airyhq/airy/issues/1743)] Permit public auth pages [[#1786](https://github.com/airyhq/airy/pull/1786)] +- [[#1768](https://github.com/airyhq/airy/issues/1768)] Bad calls to conversations info when opening inbox [[#1775](https://github.com/airyhq/airy/pull/1775)] +- [[#1764](https://github.com/airyhq/airy/issues/1764)] Filter fixed + state header bar toggle fix [[#1774](https://github.com/airyhq/airy/pull/1774)] + +#### 🧰 Maintenance + +- Bump prettier from 2.2.1 to 2.3.0 [[#1759](https://github.com/airyhq/airy/pull/1759)] +- Bump webpack-bundle-analyzer from 4.4.1 to 4.4.2 [[#1800](https://github.com/airyhq/airy/pull/1800)] +- Bump @typescript-eslint/parser from 4.23.0 to 4.24.0 [[#1801](https://github.com/airyhq/airy/pull/1801)] +- Bump @babel/core from 7.14.2 to 7.14.3 [[#1802](https://github.com/airyhq/airy/pull/1802)] +- Bump @typescript-eslint/eslint-plugin from 4.23.0 to 4.24.0 [[#1803](https://github.com/airyhq/airy/pull/1803)] +- Bump sass from 1.32.12 to 1.32.13 [[#1793](https://github.com/airyhq/airy/pull/1793)] +- Bump @bazel/typescript from 3.4.2 to 3.5.0 [[#1776](https://github.com/airyhq/airy/pull/1776)] +- Bump @types/node from 15.0.2 to 15.3.0 [[#1796](https://github.com/airyhq/airy/pull/1796)] +- Bump terser-webpack-plugin from 5.1.1 to 5.1.2 [[#1795](https://github.com/airyhq/airy/pull/1795)] +- Bump @typescript-eslint/parser from 4.22.1 to 4.23.0 [[#1779](https://github.com/airyhq/airy/pull/1779)] +- Bump @babel/core from 7.14.0 to 7.14.2 [[#1794](https://github.com/airyhq/airy/pull/1794)] +- Bump cypress from 7.2.0 to 7.3.0 [[#1780](https://github.com/airyhq/airy/pull/1780)] +- Bump sass-loader from 11.0.1 to 11.1.1 [[#1790](https://github.com/airyhq/airy/pull/1790)] +- Bump @babel/preset-env from 7.14.1 to 7.14.2 [[#1792](https://github.com/airyhq/airy/pull/1792)] +- Bump @types/react-dom from 16.9.2 to 17.0.5 [[#1789](https://github.com/airyhq/airy/pull/1789)] +- Bump core-js from 3.12.0 to 3.12.1 [[#1758](https://github.com/airyhq/airy/pull/1758)] +- Bump eslint from 7.25.0 to 7.26.0 [[#1760](https://github.com/airyhq/airy/pull/1760)] +- Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.23.0 [[#1769](https://github.com/airyhq/airy/pull/1769)] +- Bump webpack from 5.36.2 to 5.37.0 [[#1770](https://github.com/airyhq/airy/pull/1770)] + +#### Airy CLI + +You can download the Airy CLI for your operating system from the following links: + +[MacOS](https://airy-core-binaries.s3.amazonaws.com/0.22.0/darwin/amd64/airy) +[Linux](https://airy-core-binaries.s3.amazonaws.com/0.22.0/linux/amd64/airy) +[Windows](https://airy-core-binaries.s3.amazonaws.com/0.22.0/windows/amd64/airy.exe) + ## 0.21.0 +#### Changes + +- [[#1750](https://github.com/airyhq/airy/issues/1750)] Fix tags filter [[#1765](https://github.com/airyhq/airy/pull/1765)] + #### 🚀 Features +- [[#1681](https://github.com/airyhq/airy/issues/1681)] Clean phone number input [[#1772](https://github.com/airyhq/airy/pull/1772)] - [[#1519](https://github.com/airyhq/airy/issues/1519)] Implement auth UI behavior [[#1737](https://github.com/airyhq/airy/pull/1737)] -- [[#1721](https://github.com/airyhq/airy/issues/1721)] Webhook consumer start consuming from beginning[[#1722](https://github.com/airyhq/airy/pull/1722)] +- [[#1721](https://github.com/airyhq/airy/issues/1721)] Webhook consumer should start consuming… [[#1722](https://github.com/airyhq/airy/pull/1722)] - [[#1713](https://github.com/airyhq/airy/issues/1713)] Fix crash conversation from search [[#1720](https://github.com/airyhq/airy/pull/1720)] - [[#1707](https://github.com/airyhq/airy/issues/1707)] Attach user profile to application logs [[#1718](https://github.com/airyhq/airy/pull/1718)] - [[#1714](https://github.com/airyhq/airy/issues/1714)] Webhook config updates only once [[#1715](https://github.com/airyhq/airy/pull/1715)] #### 🐛 Bug Fixes +- [[#1749](https://github.com/airyhq/airy/issues/1749)] Fixed activeFilterCount [[#1747](https://github.com/airyhq/airy/pull/1747)] - [[#1763](https://github.com/airyhq/airy/issues/1763)] Fixed tag string length in contactInfo [[#1766](https://github.com/airyhq/airy/pull/1766)] - [[#1736](https://github.com/airyhq/airy/issues/1736)] improve render library for facebook [[#1756](https://github.com/airyhq/airy/pull/1756)] - [[#1748](https://github.com/airyhq/airy/issues/1748)] Add missing default redirect uri [[#1749](https://github.com/airyhq/airy/pull/1749)] @@ -42,6 +90,9 @@ sidebar_label: 📝 Changelog - Bump webpack-cli from 4.6.0 to 4.7.0 [[#1741](https://github.com/airyhq/airy/pull/1741)] - Bump @types/node from 15.0.1 to 15.0.2 [[#1723](https://github.com/airyhq/airy/pull/1723)] - Bump @typescript-eslint/parser from 4.22.0 to 4.22.1 [[#1724](https://github.com/airyhq/airy/pull/1724)] +- Bump typescript from 4.2.3 to 4.2.4 [[#1753](https://github.com/airyhq/airy/pull/1753)] +- Bump @types/react from 17.0.4 to 17.0.5 [[#1727](https://github.com/airyhq/airy/pull/1727)] +- Bump @typescript-eslint/eslint-plugin from 4.22.0 to 4.22.1 [[#1725](https://github.com/airyhq/airy/pull/1725)] #### Airy CLI