From a7741d01e8a6fdafc98d3ad08b72baba29f92625 Mon Sep 17 00:00:00 2001 From: Pascal Holy <pascal@airy.co> Date: Tue, 2 Mar 2021 13:08:24 +0100 Subject: [PATCH 01/43] Bump version to 0.12.0-alpha --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d9df1bbc0c..1f60af7134 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.0 +0.12.0-alpha From ff9fb8634f5861d910f35bca037e2ab7574025e4 Mon Sep 17 00:00:00 2001 From: Ljupco Vangelski <ljupcovangelski@users.noreply.github.com> Date: Wed, 3 Mar 2021 11:06:18 +0100 Subject: [PATCH 02/43] [#1120] Fix Shellcheck (#1121) --- scripts/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 1960d4de51..57d10bab6b 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -52,7 +52,7 @@ then ;; esac - printf "Vagrant installed in %s\n" "$(which vagrant)" + printf "Vagrant installed in %s\n" "$(command -v vagrant)" fi read -p "Do you want to add the vagrant box to the host file so you can access it under api.airy [yn]? " -n 1 -r @@ -117,7 +117,7 @@ then ;; esac - printf "Virtualbox installed in %s \n" "$(which VBoxManage)" + printf "Virtualbox installed in %s \n" "$(command -v VBoxManage)" fi From 2bbf5363bd4fe5416c4b756704316d0f5063b750 Mon Sep 17 00:00:00 2001 From: Paulo Diniz <paulo.rc.diniz@gmail.com> Date: Wed, 3 Mar 2021 12:18:49 +0100 Subject: [PATCH 03/43] [#1117] Template docs are not accessible (#1118) --- docs/sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sidebars.js b/docs/sidebars.js index ed5589a82e..cde60d86fa 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -41,6 +41,7 @@ module.exports = { 'api/endpoints/messages', 'api/endpoints/metadata', 'api/endpoints/tags', + 'api/endpoints/templates', 'api/endpoints/users', ], }, From ebd843e2c4d5e6e240d14526a45ca09d439627c3 Mon Sep 17 00:00:00 2001 From: Paulo Diniz <paulo.rc.diniz@gmail.com> Date: Wed, 3 Mar 2021 12:33:45 +0100 Subject: [PATCH 04/43] [#1124] Template endpoints return 404 (#1125) --- .../helm-chart/templates/ingress.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/infrastructure/helm-chart/templates/ingress.yaml b/infrastructure/helm-chart/templates/ingress.yaml index 4a31312cc1..da1c9ede05 100644 --- a/infrastructure/helm-chart/templates/ingress.yaml +++ b/infrastructure/helm-chart/templates/ingress.yaml @@ -169,6 +169,34 @@ spec: name: api-admin port: number: 80 + - path: /templates.create + pathType: Prefix + backend: + service: + name: api-admin + port: + number: 80 + - path: /templates.update + pathType: Prefix + backend: + service: + name: api-admin + port: + number: 80 + - path: /templates.list + pathType: Prefix + backend: + service: + name: api-admin + port: + number: 80 + - path: /templates.delete + pathType: Prefix + backend: + service: + name: api-admin + port: + number: 80 - path: /channels.facebook.connect pathType: Prefix backend: From b74db8ab671ac40a1e96fdcf985c299341e8a9a2 Mon Sep 17 00:00:00 2001 From: AudreyKj <38159391+AudreyKj@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:39:02 +0100 Subject: [PATCH 05/43] fixed highlight in inbox (#1119) * fixed highlight in inbox * fixing linting * fixed fragment --- .../ui/src/pages/Inbox/Messenger/index.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/ui/src/pages/Inbox/Messenger/index.tsx b/frontend/ui/src/pages/Inbox/Messenger/index.tsx index af7f24fa30..e91648bc74 100644 --- a/frontend/ui/src/pages/Inbox/Messenger/index.tsx +++ b/frontend/ui/src/pages/Inbox/Messenger/index.tsx @@ -36,15 +36,19 @@ const Messenger = (props: ConnectedProps<typeof connector> & RouteComponentProps return ( <section className={styles.messengerContainer}> - {!!conversations && ( - <section className={styles.messengerContainerMiddlePanel}> - <ConversationList /> - </section> - )} - <Route path={[`${match.url}/conversations/:conversationId`, `${match.url}`]} - render={props => <MessengerContainer {...props} />} + render={props => ( + <> + {!!conversations && ( + <section className={styles.messengerContainerMiddlePanel}> + <ConversationList /> + </section> + )} + + <MessengerContainer {...props} /> + </> + )} /> </section> ); From a8f4142a8933c62f91ad920b8bf7c948aba9d040 Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:41:06 +0100 Subject: [PATCH 06/43] [#660] Enable users to connect via Airy Live Chat (#1078) closes #660 --- frontend/assets/images/icons/plus-circle.svg | 7 +- frontend/assets/scss/colors.scss | 1 - frontend/ui/index.html | 10 +- frontend/ui/nginx.conf | 2 + frontend/ui/src/App.tsx | 2 +- frontend/ui/src/actions/channel/index.ts | 22 +- .../ui/src/components/IconChannel/index.tsx | 4 +- frontend/ui/src/env.ts | 2 + .../SourceDescription/index.tsx | 7 +- .../SourceInfo/index.module.scss | 17 +- .../ChannelsMainPage/SourceInfo/index.tsx | 23 +- .../Sources/ChatPluginConnect.module.scss | 155 +++++++++ .../Sources/ChatPluginConnect.tsx | 296 ++++++++++++++++++ .../Sources/ChatPluginSource.tsx | 25 +- .../Sources/FacebookSource.tsx | 10 +- .../ChannelsMainPage/Sources/GoogleSource.tsx | 3 - .../Sources/TwilioSmsSource.tsx | 3 - .../Sources/TwilioWhatsAppSource.tsx | 3 - frontend/ui/src/pages/Channels/index.tsx | 18 +- .../pages/Inbox/ConversationsFilter/Popup.tsx | 6 +- .../ui/src/reducers/data/channels/index.ts | 29 +- frontend/ui/src/routes/routes.ts | 1 + .../frontend-ui/templates/deployment.yaml | 67 ++-- lib/typescript/httpclient/client.ts | 6 + .../endpoints/connectChatPluginChannel.ts | 15 + .../httpclient/endpoints/disconnectChannel.ts | 13 +- lib/typescript/httpclient/endpoints/index.ts | 2 + .../httpclient/endpoints/updateChannel.ts | 16 + .../ConnectChatPluginRequestPayload.ts | 4 + .../payload/UpdateChannelRequestPayload.ts | 5 + lib/typescript/httpclient/payload/index.ts | 18 +- yarn.lock | 32 +- 32 files changed, 695 insertions(+), 129 deletions(-) create mode 100644 frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.module.scss create mode 100644 frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.tsx create mode 100644 lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts create mode 100644 lib/typescript/httpclient/endpoints/updateChannel.ts create mode 100644 lib/typescript/httpclient/payload/ConnectChatPluginRequestPayload.ts create mode 100644 lib/typescript/httpclient/payload/UpdateChannelRequestPayload.ts diff --git a/frontend/assets/images/icons/plus-circle.svg b/frontend/assets/images/icons/plus-circle.svg index 2067cd0bbd..3f896ed076 100644 --- a/frontend/assets/images/icons/plus-circle.svg +++ b/frontend/assets/images/icons/plus-circle.svg @@ -1,3 +1,4 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <path d="M13,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L13,13 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,13 L8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L12,12 L12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,12 Z M12.5,23 C6.70101013,23 2,18.2989899 2,12.5 C2,6.70101013 6.70101013,2 12.5,2 C18.2989899,2 23,6.70101013 23,12.5 C23,18.2989899 18.2989899,23 12.5,23 Z M12.5,22 C17.7467051,22 22,17.7467051 22,12.5 C22,7.25329488 17.7467051,3 12.5,3 C7.25329488,3 3,7.25329488 3,12.5 C3,17.7467051 7.25329488,22 12.5,22 Z"/> -</svg> +<?xml version="1.0" encoding="utf-8"?> +<svg width="24" height="24" viewBox="1.5 1.5 21 21" xmlns="http://www.w3.org/2000/svg"> + <path d="M 12.5 11.5 L 16 11.5 C 16.276 11.5 16.5 11.724 16.5 12 C 16.5 12.276 16.276 12.5 16 12.5 L 12.5 12.5 L 12.5 16 C 12.5 16.276 12.276 16.5 12 16.5 C 11.724 16.5 11.5 16.276 11.5 16 L 11.5 12.5 L 8 12.5 C 7.724 12.5 7.5 12.276 7.5 12 C 7.5 11.724 7.724 11.5 8 11.5 L 11.5 11.5 L 11.5 8 C 11.5 7.724 11.724 7.5 12 7.5 C 12.276 7.5 12.5 7.724 12.5 8 L 12.5 11.5 Z M 12 22.5 C 6.201 22.5 1.5 17.799 1.5 12 C 1.5 6.201 6.201 1.5 12 1.5 C 17.799 1.5 22.5 6.201 22.5 12 C 22.5 17.799 17.799 22.5 12 22.5 Z M 12 21.5 C 17.247 21.5 21.5 17.247 21.5 12 C 21.5 6.753 17.247 2.5 12 2.5 C 6.753 2.5 2.5 6.753 2.5 12 C 2.5 17.247 6.753 21.5 12 21.5 Z"/> +</svg> \ No newline at end of file diff --git a/frontend/assets/scss/colors.scss b/frontend/assets/scss/colors.scss index 6f9690baae..fa3bd96b1d 100644 --- a/frontend/assets/scss/colors.scss +++ b/frontend/assets/scss/colors.scss @@ -19,7 +19,6 @@ --color-red-alert: #d51548; --color-accent-magenta: #f7147d; --color-error-background: #fae6e9; - --color-red-alert: #bf1a2f; --color-highlight-yellow: #fbbd54; --color-background-yellow: #fbf9ee; --color-background-red: #fff7f9; diff --git a/frontend/ui/index.html b/frontend/ui/index.html index f85c9a66c6..9567955d3d 100644 --- a/frontend/ui/index.html +++ b/frontend/ui/index.html @@ -4,10 +4,7 @@ <title>Airy UI</title> <meta charset="utf-8" /> <link rel="shortcut icon" href="/favicon.ico" /> - <meta - name="viewport" - content="width=device-width, initial-scale=1, shrink-to-fit=no" - /> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="theme-color" content="#000000" /> <!-- @@ -17,8 +14,9 @@ <link rel="manifest" href="/manifest.json" /> <script> window.AIRY_TEMPLATED_STATE = { - "API_HOST": "{{API_HOST}}" - } + API_HOST: '{{API_HOST}}', + CHATPLUGIN_HOST: '{{CHATPLUGIN_HOST}}', + }; </script> </head> diff --git a/frontend/ui/nginx.conf b/frontend/ui/nginx.conf index bcf8949727..2c1389b3cc 100644 --- a/frontend/ui/nginx.conf +++ b/frontend/ui/nginx.conf @@ -11,6 +11,7 @@ events { # By default nginx does not make any env variables accessible to lua # http://nginx.org/en/docs/ngx_core_module.html#env env API_HOST; +env CHATPLUGIN_HOST; http { include /etc/nginx/mime.types; @@ -48,6 +49,7 @@ http { local template_string = ngx.location.capture("/index.html") template.render(template_string.body, { API_HOST = os.getenv("API_HOST") + CHATPLUGIN_HOST = os.getenv("CHATPLUGIN_HOST") }) } } diff --git a/frontend/ui/src/App.tsx b/frontend/ui/src/App.tsx index 54f5078d78..65c78c7c2b 100644 --- a/frontend/ui/src/App.tsx +++ b/frontend/ui/src/App.tsx @@ -84,7 +84,7 @@ class App extends Component<ConnectedProps<typeof connector> & RouteComponentPro <Route exact path={LOGIN_ROUTE} component={Login} /> <Route path={INBOX_ROUTE} component={Inbox} /> <Route exact path={LOGOUT_ROUTE} component={Logout} /> - <Route exact path={CHANNELS_ROUTE} component={Channels} /> + <Route path={CHANNELS_ROUTE} component={Channels} /> <Route component={NotFound} /> </Switch> </div> diff --git a/frontend/ui/src/actions/channel/index.ts b/frontend/ui/src/actions/channel/index.ts index 860a622c27..5c49dfea75 100644 --- a/frontend/ui/src/actions/channel/index.ts +++ b/frontend/ui/src/actions/channel/index.ts @@ -6,12 +6,15 @@ import { ConnectChannelRequestPayload, ExploreChannelRequestPayload, DisconnectChannelRequestPayload, + ConnectChatPluginRequestPayload, + UpdateChannelRequestPayload, } from 'httpclient'; import {HttpClientInstance} from '../../InitializeAiryApi'; const SET_CURRENT_CHANNELS = '@@channel/SET_CHANNELS'; const ADD_CHANNELS = '@@channel/ADD_CHANNELS'; const SET_CHANNEL = '@@channel/SET_CHANNEL'; +const DELETE_CHANNEL = '@@channel/DELETE_CHANNEL'; export const setCurrentChannelsAction = createAction(SET_CURRENT_CHANNELS, resolve => (channels: Channel[]) => resolve(channels) @@ -19,6 +22,7 @@ export const setCurrentChannelsAction = createAction(SET_CURRENT_CHANNELS, resol export const addChannelsAction = createAction(ADD_CHANNELS, resolve => (channels: Channel[]) => resolve(channels)); export const setChannelAction = createAction(SET_CHANNEL, resolve => (channel: Channel) => resolve(channel)); +export const deleteChannelAction = createAction(DELETE_CHANNEL, resolve => (channelId: string) => resolve(channelId)); export const listChannels = () => async (dispatch: Dispatch<any>) => HttpClientInstance.listChannels().then((response: Channel[]) => { @@ -39,10 +43,22 @@ export const connectChannel = (requestPayload: ConnectChannelRequestPayload) => return Promise.resolve(response); }); +export const connectChatPlugin = (requestPayload: ConnectChatPluginRequestPayload) => async (dispatch: Dispatch<any>) => + HttpClientInstance.connectChatPluginChannel(requestPayload).then((response: Channel) => { + dispatch(addChannelsAction([response])); + return Promise.resolve(response); + }); + +export const updateChannel = (requestPayload: UpdateChannelRequestPayload) => async (dispatch: Dispatch<any>) => + HttpClientInstance.updateChannel(requestPayload).then((response: Channel) => { + dispatch(setChannelAction(response)); + return Promise.resolve(response); + }); + export const disconnectChannel = (source: string, requestPayload: DisconnectChannelRequestPayload) => async ( dispatch: Dispatch<any> ) => - HttpClientInstance.disconnectChannel(source, requestPayload).then((response: Channel[]) => { - dispatch(setCurrentChannelsAction(response)); - return Promise.resolve(response); + HttpClientInstance.disconnectChannel(source, requestPayload).then(() => { + dispatch(deleteChannelAction(requestPayload.channelId)); + return Promise.resolve(true); }); diff --git a/frontend/ui/src/components/IconChannel/index.tsx b/frontend/ui/src/components/IconChannel/index.tsx index b69c530787..0076e9df4b 100644 --- a/frontend/ui/src/components/IconChannel/index.tsx +++ b/frontend/ui/src/components/IconChannel/index.tsx @@ -80,14 +80,14 @@ const IconChannel: React.FC<IconChannelProps> = ({ return ( <div className={styles.iconName}> {channelInfo.icon()} - <p>{channel.metadata.name}</p> + <p>{channel.metadata?.name}</p> </div> ); } else if (showAvatar && showName) { return ( <div className={styles.avatarName}> {channelInfo.avatar()} - <p>{channel.metadata.name}</p> + <p>{channel.metadata?.name}</p> </div> ); } else if (icon && text) { diff --git a/frontend/ui/src/env.ts b/frontend/ui/src/env.ts index f5761c02e7..0e46eb65ed 100644 --- a/frontend/ui/src/env.ts +++ b/frontend/ui/src/env.ts @@ -1,5 +1,6 @@ export interface Env { API_HOST?: string; + CHATPLUGIN_HOST?: string; } declare const window: { @@ -10,4 +11,5 @@ const templatedState: Env = window.AIRY_TEMPLATED_STATE || {}; export const env: Env = { API_HOST: templatedState.API_HOST || 'api.airy', + CHATPLUGIN_HOST: templatedState.CHATPLUGIN_HOST || 'chatplugin.airy', }; diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceDescription/index.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceDescription/index.tsx index adf33c07a8..93d0a1c52a 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceDescription/index.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceDescription/index.tsx @@ -1,12 +1,13 @@ import React from 'react'; import styles from './index.module.scss'; +import {ReactComponent as AddIcon} from 'assets/images/icons/plus-circle.svg'; type SourceDescriptionProps = { image: JSX.Element; title: string; text: string; - buttonIcon: JSX.Element; displayButton: boolean; + onAddChannelClick?: () => void; }; const SourceDescription = (props: SourceDescriptionProps) => { @@ -22,9 +23,9 @@ const SourceDescription = (props: SourceDescriptionProps) => { {props.displayButton && ( <div className={styles.channelButton}> - <button type="button" className={styles.addChannelButton}> + <button type="button" className={styles.addChannelButton} onClick={props.onAddChannelClick}> <div className={styles.channelButtonIcon} title="Add a channel"> - {props.buttonIcon} + <AddIcon /> </div> </button> </div> diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.module.scss b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.module.scss index 00fc9cfbe1..e033a962db 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.module.scss +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.module.scss @@ -55,9 +55,18 @@ } .connectedChannelData { + @include font-base; display: flex; - align-items: center; margin: 4px; + align-items: flex-start; + border: none; + background-color: inherit; + text-align: left; + cursor: pointer; + + &:hover { + text-decoration: underline; + } } .channelListEntry { @@ -81,12 +90,16 @@ .connectedChannelName { min-width: 168px; - height: 24px; margin: 0 4px 0 4px; max-width: 200px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; + margin-right: 7px; +} + +.channelId { + padding-top: 10px; } .channelButton { diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.tsx index 5fbedcbf5d..4a95225ceb 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/SourceInfo/index.tsx @@ -1,6 +1,7 @@ import React from 'react'; import {Channel} from 'httpclient'; import {LinkButton} from '@airyhq/components'; +import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; import styles from './index.module.scss'; type SourceInfoProps = { @@ -9,7 +10,9 @@ type SourceInfoProps = { connected: string; placeholderImage?: JSX.Element; isConnected: string; - addAChannel: JSX.Element; + onAddChannelClick?: () => void; + onMoreChannelsClick?: () => void; + onChannelClick?: (channel: Channel) => void; }; const SourceInfo = (props: SourceInfoProps) => { @@ -37,28 +40,28 @@ const SourceInfo = (props: SourceInfoProps) => { {channels.slice(0, channelsToShow).map((channel: Channel) => { return ( <li key={channel.sourceChannelId} className={styles.channelListEntry}> - <div className={styles.connectedChannelData}> - {source === 'facebook' && channel.metadata.imageUrl ? ( + <button className={styles.connectedChannelData} onClick={() => props.onChannelClick(channel)}> + {channel.metadata?.imageUrl ? ( <img - src={channel.metadata.imageUrl} - alt={channel.metadata.name} + src={channel.metadata?.imageUrl} + alt={channel.metadata?.name} className={styles.facebookImage} /> ) : ( <div className={styles.placeholderLogo}>{props.placeholderImage} </div> )} - <div className={styles.connectedChannelName}>{channel.metadata.name}</div> + <div className={styles.connectedChannelName}>{channel.metadata?.name}</div> {isPhoneNumberSource() && ( <div className={styles.extraPhoneInfo}>{channel.sourceChannelId}</div> )} - </div> + </button> </li> ); })} </div> <div className={styles.extraChannel}> {hasExtraChannels && ( - <LinkButton> + <LinkButton onClick={props.onMoreChannelsClick}> +{channels.length - channelsToShow} {props.isConnected} </LinkButton> )} @@ -67,9 +70,9 @@ const SourceInfo = (props: SourceInfoProps) => { </div> <div className={styles.channelButton}> - <button type="button" className={styles.addChannelButton}> + <button type="button" className={styles.addChannelButton} onClick={props.onAddChannelClick}> <div className={styles.channelButtonIcon} title="Add a channel"> - {props.addAChannel} + <AddChannel /> </div> </button> </div> diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.module.scss b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.module.scss new file mode 100644 index 0000000000..68f5037ea4 --- /dev/null +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.module.scss @@ -0,0 +1,155 @@ +@import '../../../../assets/scss/fonts'; +@import '../../../../assets/scss/colors'; + +.wrapper { + background: white; + display: block; + border-radius: 10px; + padding-left: 96px; + padding-top: 88px; + width: 100%; + overflow-y: auto; + padding: 32px; + margin: 88px 1.5em 0 100px; + min-height: calc(100vh - 170px); +} + +.headline { + @include font-xl; + font-weight: bold; + margin-bottom: 8px; +} + +.backButton { + display: block; + margin-bottom: 16px; + cursor: pointer; + text-decoration: none; + &:hover { + text-decoration: underline; + } +} + +.backIcon { + path { + fill: var(--color-airy-blue); + } + margin-right: 8px; +} + +.newPageParagraph { + margin: 24px 0; + color: var(--color-text-gray); +} + +.updatePageParagraph { + margin: 24px 0; + color: var(--color-text-gray); +} + +.formWrapper { + display: flex; +} + +.formRow { + margin-bottom: 16px; +} + +.settings { + width: 20rem; +} + +.headline { + display: flex; +} + +.headlineText { + flex-grow: 1; +} + +.overview { + margin-top: 32px; +} + +.listItem { + display: flex; + align-items: center; + margin-bottom: 8px; +} + +.listChannelName { + flex-grow: 1; + border-bottom: 1px solid var(--color-light-gray); + height: 50px; + display: flex; + align-items: center; + padding-left: 16px; +} + +.listButtons { + display: flex; + border-bottom: 1px solid var(--color-light-gray); + height: 50px; + align-items: center; +} + +.listButtonEdit { + margin-right: 8px; + font-weight: normal; +} + +.channelImage { + width: 40px; + height: 40px; + object-fit: cover; + border-radius: 100%; +} + +.tabView { + display: flex; + margin-bottom: 16px; + list-style-type: none; + + li { + margin-right: 16px; + } +} + +.tabEntrySelected { + border-bottom: 2px solid var(--color-airy-blue); + a { + color: var(--color-text-contrast); + font-weight: bold; + text-decoration: none; + } +} + +.tabEntry { + a { + color: var(--color-airy-blue); + text-decoration: none; + } +} + +.installHint { + font-weight: bold; + margin-bottom: 8px; + code { + color: var(--color-red-alert); + background-color: var(--color-background-gray); + padding: 2px; + } +} + +.codeArea { + @include font-s; + width: 40em; + height: 17em; + background-color: var(--color-background-gray); + color: var(--color-text-contrast); + border-radius: 8px; + border: 1px solid var(--color-dark-elements-gray); + resize: none; + padding: 8px; + margin-bottom: 16px; +} diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.tsx new file mode 100644 index 0000000000..14c74a3711 --- /dev/null +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginConnect.tsx @@ -0,0 +1,296 @@ +import React, {FormEvent, useEffect, useState, MouseEvent, createRef} from 'react'; +import _, {connect, ConnectedProps} from 'react-redux'; +import {Button, Input, LinkButton} from '@airyhq/components'; +import {withRouter, RouteComponentProps, Link} from 'react-router-dom'; +import {Channel} from 'httpclient'; + +import {ReactComponent as AiryLogo} from 'assets/images/icons/airy_avatar.svg'; +import {ReactComponent as BackIcon} from 'assets/images/icons/arrow-left-2.svg'; + +import {env} from '../../../../env'; +import {CHANNELS_CHAT_PLUGIN_ROUTE} from '../../../../routes/routes'; +import {connectChatPlugin, updateChannel, disconnectChannel} from '../../../../actions/channel'; +import {StateModel} from '../../../../reducers'; +import {allChannels} from '../../../../selectors/channels'; + +import styles from './ChatPluginConnect.module.scss'; + +const mapDispatchToProps = { + connectChatPlugin, + updateChannel, + disconnectChannel, +}; + +const mapStateToProps = (state: StateModel) => ({ + channels: Object.values(allChannels(state)), + config: state.data.config, +}); + +const connector = connect(mapStateToProps, mapDispatchToProps); + +interface ChatPluginRouterProps { + channelId?: string; +} + +type ChatPluginProps = {} & ConnectedProps<typeof connector> & RouteComponentProps<ChatPluginRouterProps>; + +const ChatPluginConnect = (props: ChatPluginProps) => { + const [showNewPage, setShowNewPage] = useState(true); + const [displayName, setDisplayName] = useState(''); + const [imageUrl, setImageUrl] = useState(''); + const [currentPage, setCurrentPage] = useState('settings'); + const channelId = props.match.params.channelId; + const codeAreaRef = createRef<HTMLTextAreaElement>(); + + useEffect(() => { + setShowNewPage(true); + setCurrentPage('settings'); + }, []); + + useEffect(() => { + if (channelId !== 'new' && channelId?.length) { + const channel = props.channels.find((channel: Channel) => { + return channel.id === channelId; + }); + if (channel) { + setDisplayName(channel.metadata?.name || ''); + setImageUrl(channel.metadata?.imageUrl || ''); + } + } + }, [props.channels, channelId]); + + const createNewConnection = (event: FormEvent<HTMLFormElement>) => { + event.preventDefault(); + props + .connectChatPlugin({ + name: displayName, + ...(imageUrl.length > 0 && { + imageUrl: imageUrl, + }), + }) + .then((channel: Channel) => { + props.history.replace(CHANNELS_CHAT_PLUGIN_ROUTE + '/' + channel.id); + }); + }; + + const updateConnection = (event: FormEvent<HTMLFormElement>) => { + event.preventDefault(); + props.updateChannel({channelId: channelId, name: displayName, imageUrl: imageUrl}).then(() => { + props.history.replace(CHANNELS_CHAT_PLUGIN_ROUTE); + }); + }; + + const renderFormFields = () => ( + <> + <div className={styles.formRow}> + <Input + type="text" + name="displayName" + value={displayName} + onChange={(e: React.ChangeEvent<HTMLInputElement>) => { + setDisplayName(e.target.value); + }} + label="Display Name" + placeholder="Add a name" + autoFocus + required + height={32} + fontClass="font-s" + /> + </div> + + <div className={styles.formRow}> + <Input + type="url" + name="url" + value={imageUrl} + onChange={(e: React.ChangeEvent<HTMLInputElement>) => { + setImageUrl(e.target.value); + }} + label="Image URL" + placeholder="(optionaly) add an image url" + hint="max. 1024x1024 pixel PNG" + height={32} + fontClass="font-s" + /> + </div> + </> + ); + + const renderNewPage = () => { + return showNewPage ? ( + <div> + <p className={styles.newPageParagraph}>Add Airy Live Chat to your website and application</p> + + <Button type="button" onClick={() => setShowNewPage(false)}> + Connect Airy Live Chat + </Button> + </div> + ) : ( + <div> + <p className={styles.newPageParagraph}>Add Airy Live Chat to your website and application</p> + <div className={styles.formWrapper}> + <div className={styles.settings}> + <form className={styles.form} onSubmit={createNewConnection}> + {renderFormFields()} + <Button type="submit" styleVariant="small"> + Save + </Button> + </form> + </div> + </div> + </div> + ); + }; + + const showSettings = (event: MouseEvent<HTMLAnchorElement>) => { + event.preventDefault(); + setCurrentPage('settings'); + }; + + const showInstallDoc = (event: MouseEvent<HTMLAnchorElement>) => { + event.preventDefault(); + setCurrentPage('installDoc'); + }; + + const generateCode = () => { + return `<script> + (function(w, d, s, n) { + w[n] = w[n] || {}; + w[n].channelId = "${channelId}"; + w[n].host = "${'//' + env.CHATPLUGIN_HOST}"; + var f = d.getElementsByTagName(s)[0], + j = d.createElement(s); + j.async = true; + j.src = w[n].host + "/s.js"; + f.parentNode.insertBefore(j, f); + })(window, document, "script", "airy"); +</script>`; + }; + + const copyToClipboard = () => { + codeAreaRef.current?.select(); + document.execCommand('copy'); + }; + + const renderChannelPage = () => ( + <div> + <p className={styles.updatePageParagraph}>Add Airy Live Chat to your website and application</p> + <ul className={styles.tabView}> + <li className={currentPage == 'settings' ? styles.tabEntrySelected : styles.tabEntry}> + <a href="#" onClick={showSettings}> + Settings + </a> + </li> + <li className={currentPage == 'installDoc' ? styles.tabEntrySelected : styles.tabEntry}> + <a href="#" onClick={showInstallDoc}> + Install app + </a> + </li> + </ul> + <div className={styles.formWrapper}> + {currentPage === 'settings' ? ( + <div className={styles.settings}> + <form className={styles.form} onSubmit={updateConnection}> + {renderFormFields()} + + <Button type="submit" styleVariant="small"> + Update + </Button> + </form> + </div> + ) : ( + <div className={styles.installDocs}> + <div className={styles.installHint}> + Add this code inside the tag <code><head></code>: + </div> + <div> + <textarea readOnly className={styles.codeArea} ref={codeAreaRef} value={generateCode()}></textarea> + </div> + <Button onClick={copyToClipboard}>Copy code</Button> + </div> + )} + </div> + </div> + ); + + const disconnectChannel = (channel: Channel) => { + if (window.confirm('Do you really want to delete this channel?')) { + props.disconnectChannel('chatplugin', {channelId: channel.id}); + } + }; + + const renderOverviewPage = () => ( + <div className={styles.overview}> + <ul> + {props.channels.map((channel: Channel) => ( + <li key={channel.id} className={styles.listItem}> + <div className={styles.channelLogo}> + {channel.metadata?.imageUrl ? ( + <img src={channel.metadata?.imageUrl} alt={channel.metadata?.name} className={styles.channelImage} /> + ) : ( + <div className={styles.placeholderLogo}> + <AiryLogo />{' '} + </div> + )} + </div> + + <div className={styles.listChannelName}>{channel.metadata?.name}</div> + <div className={styles.listButtons}> + <Link className={styles.listButtonEdit} to={`${CHANNELS_CHAT_PLUGIN_ROUTE}/${channel.id}`}> + Edit + </Link> + <LinkButton + type="button" + onClick={() => { + disconnectChannel(channel); + }}> + Delete + </LinkButton> + </div> + </li> + ))} + </ul> + </div> + ); + + const openNewPage = () => { + props.history.push(CHANNELS_CHAT_PLUGIN_ROUTE + '/new'); + }; + + const renderPage = () => { + if (channelId === 'new') { + return renderNewPage(); + } + + if (channelId?.length > 0) { + return renderChannelPage(); + } + + return renderOverviewPage(); + }; + + return ( + <div className={styles.wrapper}> + <div className={styles.headline}> + <h1 className={styles.headlineText}>Airy Live Chat</h1> + {channelId == null && ( + <div className={styles.addButton}> + <Button onClick={openNewPage}> + <span title="Add channel">+</span> + </Button> + </div> + )} + </div> + + <LinkButton onClick={props.history.goBack} type="button"> + <BackIcon className={styles.backIcon} /> + Back + </LinkButton> + + {renderPage()} + </div> + ); +}; + +export default connector(withRouter(ChatPluginConnect)); diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginSource.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginSource.tsx index e2cb01d469..751d6cd8fb 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginSource.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/ChatPluginSource.tsx @@ -1,13 +1,16 @@ import React from 'react'; -import {ReactComponent as AiryLogo} from 'assets/images/icons/airy_avatar.svg'; -import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; +import {withRouter, RouteComponentProps} from 'react-router-dom'; import {Channel} from 'httpclient'; + +import {ReactComponent as AiryLogo} from 'assets/images/icons/airy_avatar.svg'; + import SourceInfo from '../SourceInfo'; import SourceDescription from '../SourceDescription'; +import {CHANNELS_CHAT_PLUGIN_ROUTE} from '../../../../routes/routes'; type ChatPluginProps = {pluginSource: Channel[]}; -const ChatPluginSource = (props: ChatPluginProps) => { +const ChatPluginSource = (props: ChatPluginProps & RouteComponentProps) => { const channels = props.pluginSource.filter((channel: Channel) => channel.source === 'chat_plugin'); return ( @@ -16,8 +19,10 @@ const ChatPluginSource = (props: ChatPluginProps) => { title="Airy Live Chat " text="Best of class browser messenger" image={<AiryLogo />} - buttonIcon={<AddChannel />} displayButton={!channels.length} + onAddChannelClick={() => { + props.history.push(CHANNELS_CHAT_PLUGIN_ROUTE + '/new'); + }} /> <SourceInfo @@ -26,10 +31,18 @@ const ChatPluginSource = (props: ChatPluginProps) => { connected="CONNECTED" placeholderImage={<AiryLogo />} isConnected="connected" - addAChannel={<AddChannel />} + onMoreChannelsClick={() => { + props.history.push(CHANNELS_CHAT_PLUGIN_ROUTE); + }} + onAddChannelClick={() => { + props.history.push(CHANNELS_CHAT_PLUGIN_ROUTE + '/new'); + }} + onChannelClick={(channel: Channel) => { + props.history.push(`${CHANNELS_CHAT_PLUGIN_ROUTE}/${channel.id}`); + }} /> </div> ); }; -export default ChatPluginSource; +export default withRouter(ChatPluginSource); diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/FacebookSource.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/FacebookSource.tsx index 18d33d43ce..24fa4c7e5d 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/FacebookSource.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/FacebookSource.tsx @@ -1,6 +1,5 @@ import React from 'react'; import {ReactComponent as FacebookLogo} from 'assets/images/icons/messenger_avatar.svg'; -import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; import {Channel} from 'httpclient'; import SourceDescription from '../SourceDescription'; import SourceInfo from '../SourceInfo'; @@ -16,17 +15,10 @@ const FacebookSource = (props: FacebookSourceProps) => { title="Messenger " text="Connect multiple Facebook pages" image={<FacebookLogo />} - buttonIcon={<AddChannel />} displayButton={!channels.length} /> - <SourceInfo - source="facebook" - channels={channels} - connected="CONNECTED" - isConnected="connected" - addAChannel={<AddChannel />} - /> + <SourceInfo source="facebook" channels={channels} connected="CONNECTED" isConnected="connected" /> </div> ); }; diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/GoogleSource.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/GoogleSource.tsx index 0236f306be..5e914d8e96 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/GoogleSource.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/GoogleSource.tsx @@ -1,6 +1,5 @@ import React from 'react'; import {ReactComponent as GoogleLogo} from 'assets/images/icons/google_avatar.svg'; -import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; import {Channel} from 'httpclient'; import SourceDescription from '../SourceDescription'; import SourceInfo from '../SourceInfo'; @@ -16,7 +15,6 @@ const GoogleSource = (props: GoogleSourceProps) => { title="Google Business Messages" text="Be there when people search" image={<GoogleLogo />} - buttonIcon={<AddChannel />} displayButton={!channels.length} /> @@ -26,7 +24,6 @@ const GoogleSource = (props: GoogleSourceProps) => { connected="CONNECTED" placeholderImage={<GoogleLogo />} isConnected="connected" - addAChannel={<AddChannel />} /> </div> ); diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioSmsSource.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioSmsSource.tsx index 0b44967593..64db9a4d8e 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioSmsSource.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioSmsSource.tsx @@ -1,6 +1,5 @@ import React from 'react'; import {ReactComponent as SMSLogo} from 'assets/images/icons/sms_avatar.svg'; -import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; import {Channel} from 'httpclient'; import SourceDescription from '../SourceDescription'; import SourceInfo from '../SourceInfo'; @@ -16,7 +15,6 @@ const TwilioSmsSource = (props: TwilioSmsSourceProps) => { title="SMS " text="Deliver SMS with ease" image={<SMSLogo />} - buttonIcon={<AddChannel />} displayButton={!channels.length} /> @@ -26,7 +24,6 @@ const TwilioSmsSource = (props: TwilioSmsSourceProps) => { connected="CONNECTED" placeholderImage={<SMSLogo />} isConnected="connected" - addAChannel={<AddChannel />} /> </div> ); diff --git a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioWhatsAppSource.tsx b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioWhatsAppSource.tsx index cdeafbb522..12111d14e0 100644 --- a/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioWhatsAppSource.tsx +++ b/frontend/ui/src/pages/Channels/ChannelsMainPage/Sources/TwilioWhatsAppSource.tsx @@ -1,6 +1,5 @@ import React from 'react'; import {ReactComponent as WhatsappLogo} from 'assets/images/icons/whatsapp_avatar.svg'; -import {ReactComponent as AddChannel} from 'assets/images/icons/plus-circle.svg'; import {Channel} from 'httpclient'; import SourceDescription from '../SourceDescription'; import SourceInfo from '../SourceInfo'; @@ -16,7 +15,6 @@ const TwilioWhatsAppSource = (props: TwilioWhatsAppSourceProps) => { title="Whatsapp" text="World #1 chat app" image={<WhatsappLogo />} - buttonIcon={<AddChannel />} displayButton={!channels.length} /> @@ -26,7 +24,6 @@ const TwilioWhatsAppSource = (props: TwilioWhatsAppSourceProps) => { connected="CONNECTED" placeholderImage={<WhatsappLogo />} isConnected="connected" - addAChannel={<AddChannel />} /> </div> ); diff --git a/frontend/ui/src/pages/Channels/index.tsx b/frontend/ui/src/pages/Channels/index.tsx index 6cae7267bb..67ba5d807f 100644 --- a/frontend/ui/src/pages/Channels/index.tsx +++ b/frontend/ui/src/pages/Channels/index.tsx @@ -1,6 +1,7 @@ import React, {useEffect} from 'react'; import _, {connect, ConnectedProps} from 'react-redux'; -import {RouteComponentProps} from 'react-router-dom'; +import {Route, RouteComponentProps, Switch} from 'react-router-dom'; + import {listChannels} from '../../actions/channel'; import {getClientConfig} from '../../actions/config'; import {StateModel} from '../../reducers/index'; @@ -10,6 +11,8 @@ import {allChannels} from '../../selectors/channels'; import {setPageTitle} from '../../services/pageTitle'; import ChannelsMainPage from './ChannelsMainPage'; +import ChatPluginConnect from './ChannelsMainPage/Sources/ChatPluginConnect'; +import {CHANNELS_CHAT_PLUGIN_ROUTE} from '../../routes/routes'; const mapDispatchToProps = { listChannels, @@ -27,16 +30,25 @@ type ChannelsConnectProps = {} & ConnectedProps<typeof connector> & RouteCompone const Channels = (props: ChannelsConnectProps) => { useEffect(() => { - props.listChannels(); + if (props.channels.length == 0) { + props.listChannels(); + } props.getClientConfig(); setPageTitle('Channels'); }, []); - return ( + const renderChannels = () => ( <div className={styles.channelsWrapper}> <ChannelsMainPage channels={props.channels} config={props.config} /> </div> ); + + return ( + <Switch> + <Route path={[`${CHANNELS_CHAT_PLUGIN_ROUTE}/:channelId?`]} component={ChatPluginConnect} /> + <Route path="/" render={renderChannels} /> + </Switch> + ); }; export default connector(Channels); diff --git a/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx b/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx index cf56589df3..e89c019dca 100644 --- a/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx +++ b/frontend/ui/src/pages/Inbox/ConversationsFilter/Popup.tsx @@ -161,8 +161,8 @@ const PopUpFilter = (props: PopUpFilterProps) => { /> </div> <div className={styles.sourcesList}> - {sortBy(channels, channel => channel.metadata.name) - .filter((channel: Channel) => channel.metadata.name.toLowerCase().includes(pageSearch.toLowerCase())) + {sortBy(channels, channel => channel.metadata?.name) + .filter((channel: Channel) => channel.metadata?.name.toLowerCase().includes(pageSearch.toLowerCase())) .map((channel, key) => ( <div key={key} @@ -180,7 +180,7 @@ const PopUpFilter = (props: PopUpFilterProps) => { </div> )} - <div className={styles.pageName}>{channel.metadata.name}</div> + <div className={styles.pageName}>{channel.metadata?.name}</div> </div> ))} </div> diff --git a/frontend/ui/src/reducers/data/channels/index.ts b/frontend/ui/src/reducers/data/channels/index.ts index 18566e5f2f..9a615a8b7f 100644 --- a/frontend/ui/src/reducers/data/channels/index.ts +++ b/frontend/ui/src/reducers/data/channels/index.ts @@ -2,7 +2,7 @@ import {ActionType, getType} from 'typesafe-actions'; import {Channel} from 'httpclient'; import * as actions from '../../../actions/channel'; import * as metadataActions from '../../../actions/metadata'; -import {merge} from 'lodash-es'; +import {merge, omitBy} from 'lodash-es'; type Action = ActionType<typeof actions> | ActionType<typeof metadataActions>; @@ -10,10 +10,24 @@ export interface ChannelsState { [channelId: string]: Channel; } -const setChannel = (state: ChannelsState, channel: Channel) => ({ - ...state, - [channel.id]: channel, -}); +const setChannel = (state: ChannelsState, channel: Channel) => { + if (channel.metadata != null) { + return { + ...state, + [channel.id]: channel, + }; + } + + // Sometimes the websocket sends channels with metadata that is null. In + // that case we want to preserve the metadata we already have. + return { + ...state, + [channel.id]: { + ...channel, + metadata: state[channel.id]?.metadata, + }, + }; +}; const channelsReducer = (state = {}, action: Action): ChannelsState => { switch (action.type) { @@ -36,6 +50,11 @@ const channelsReducer = (state = {}, action: Action): ChannelsState => { return action.payload.reduce(setChannel, state); case getType(actions.setChannelAction): return setChannel(state, action.payload); + case getType(actions.deleteChannelAction): + return omitBy(state, (_channel, channelId: string) => { + return channelId == action.payload; + }); + default: return state; } diff --git a/frontend/ui/src/routes/routes.ts b/frontend/ui/src/routes/routes.ts index d19738cf1d..821f03c28c 100644 --- a/frontend/ui/src/routes/routes.ts +++ b/frontend/ui/src/routes/routes.ts @@ -2,6 +2,7 @@ export const ROOT_ROUTE = '/'; export const LOGIN_ROUTE = '/login'; export const LOGOUT_ROUTE = '/logout'; export const CHANNELS_ROUTE = '/channels'; +export const CHANNELS_CHAT_PLUGIN_ROUTE = '/channels/chat_plugin'; export const INBOX_ROUTE = '/inbox'; export const INBOX_CONVERSATIONS_ROUTE = '/inbox/conversations'; export const TAGS_ROUTE = '/tags'; diff --git a/infrastructure/helm-chart/charts/apps/charts/frontend/charts/frontend-ui/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/frontend/charts/frontend-ui/templates/deployment.yaml index eba729dc52..6aef864fd7 100644 --- a/infrastructure/helm-chart/charts/apps/charts/frontend/charts/frontend-ui/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/frontend/charts/frontend-ui/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: frontend-ui - namespace: {{ .Values.global.namespace }} + namespace: {{.Values.global.namespace}} labels: app: frontend-ui type: frontend @@ -22,37 +22,42 @@ spec: app: frontend-ui spec: containers: - - name: app - image: "{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}" - imagePullPolicy: Always - env: - - name: API_HOST - valueFrom: - configMapKeyRef: - name: hostnames - key: API_HOST - livenessProbe: - httpGet: - path: /health - port: 80 - httpHeaders: - - name: Health-Check - value: health-check - initialDelaySeconds: 30 - periodSeconds: 10 - failureThreshold: 3 + - name: app + image: '{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}' + imagePullPolicy: Always + env: + - name: API_HOST + valueFrom: + configMapKeyRef: + name: hostnames + key: API_HOST + - name: CHATPLUGIN_HOST + valueFrom: + configMapKeyRef: + name: hostnames + key: CHATPLUGIN_HOST + livenessProbe: + httpGet: + path: /health + port: 80 + httpHeaders: + - name: Health-Check + value: health-check + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 3 initContainers: - - name: wait - image: busybox - command: ["/bin/sh", "/opt/provisioning/wait-for-service.sh"] - env: - - name: SERVICE_NAME - value: api-auth - - name: SERVICE_PORT - value: "80" - volumeMounts: - - name: provisioning-scripts - mountPath: /opt/provisioning + - name: wait + image: busybox + command: ['/bin/sh', '/opt/provisioning/wait-for-service.sh'] + env: + - name: SERVICE_NAME + value: api-auth + - name: SERVICE_PORT + value: '80' + volumeMounts: + - name: provisioning-scripts + mountPath: /opt/provisioning volumes: - name: provisioning-scripts configMap: diff --git a/lib/typescript/httpclient/client.ts b/lib/typescript/httpclient/client.ts index 9e1a794578..a2b172b139 100644 --- a/lib/typescript/httpclient/client.ts +++ b/lib/typescript/httpclient/client.ts @@ -10,6 +10,8 @@ import { UntagConversationRequestPayload, MessagePayload, ListMessagesRequestPayload, + ConnectChatPluginRequestPayload, + UpdateChannelRequestPayload, } from './payload'; import {Tag, Message} from './model'; @@ -91,6 +93,10 @@ export class HttpClient { public connectFacebookChannel: (requestPayload: ConnectChannelRequestPayload) => Promise<any>; + public connectChatPluginChannel: (requestPayload: ConnectChatPluginRequestPayload) => Promise<any>; + + public updateChannel: (requestPayload: UpdateChannelRequestPayload) => Promise<any>; + public disconnectChannel: (source: string, requestPayload: DisconnectChannelRequestPayload) => Promise<any>; public listConversations: (conversationListRequest: ListConversationsRequestPayload) => Promise<any>; diff --git a/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts b/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts new file mode 100644 index 0000000000..1056706fb4 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts @@ -0,0 +1,15 @@ +import {ChannelPayload, ConnectChatPluginRequestPayload} from '../payload'; +/* eslint-disable @typescript-eslint/no-var-requires */ +const camelcaseKeys = require('camelcase-keys'); +import {HttpClient} from '../client'; + +export default HttpClient.prototype.connectChatPluginChannel = async function( + requestPayload: ConnectChatPluginRequestPayload +) { + const response: ChannelPayload = await this.doFetchFromBackend( + 'channels.chatplugin.connect', + camelcaseKeys(requestPayload) + ); + + return camelcaseKeys(response, {deep: true, stopPaths: ['metadata.userData']}); +}; diff --git a/lib/typescript/httpclient/endpoints/disconnectChannel.ts b/lib/typescript/httpclient/endpoints/disconnectChannel.ts index 9131318ce4..78794d7d22 100644 --- a/lib/typescript/httpclient/endpoints/disconnectChannel.ts +++ b/lib/typescript/httpclient/endpoints/disconnectChannel.ts @@ -1,16 +1,13 @@ -import {DisconnectChannelRequestPayload, ChannelsPayload} from '../payload'; -/* eslint-disable @typescript-eslint/no-var-requires */ -const camelcaseKeys = require('camelcase-keys'); +import {DisconnectChannelRequestPayload} from '../payload'; import {HttpClient} from '../client'; export default HttpClient.prototype.disconnectChannel = async function( source: string, requestPayload: DisconnectChannelRequestPayload ) { - const response: ChannelsPayload = await this.doFetchFromBackend( - `channels.${source}.disconnect`, - camelcaseKeys(requestPayload) - ); + await this.doFetchFromBackend(`channels.${source}.disconnect`, { + channel_id: requestPayload.channelId, + }); - return camelcaseKeys(response.data, {deep: true, stopPaths: ['metadata.userData']}); + return true; }; diff --git a/lib/typescript/httpclient/endpoints/index.ts b/lib/typescript/httpclient/endpoints/index.ts index 702a9a1d0b..46958c75f3 100644 --- a/lib/typescript/httpclient/endpoints/index.ts +++ b/lib/typescript/httpclient/endpoints/index.ts @@ -1,6 +1,7 @@ export * from './listChannels'; export * from './exploreFacebookChannels'; export * from './connectFacebookChannel'; +export * from './connectChatPluginChannel'; export * from './disconnectChannel'; export * from './listConversations'; export * from './getConversationInfo'; @@ -15,3 +16,4 @@ export * from './tagConversation'; export * from './untagConversation'; export * from './sendMessages'; export * from './getConfig'; +export * from './updateChannel'; diff --git a/lib/typescript/httpclient/endpoints/updateChannel.ts b/lib/typescript/httpclient/endpoints/updateChannel.ts new file mode 100644 index 0000000000..9693892926 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/updateChannel.ts @@ -0,0 +1,16 @@ +import {ChannelPayload, UpdateChannelRequestPayload} from '../payload'; +/* eslint-disable @typescript-eslint/no-var-requires */ +const camelcaseKeys = require('camelcase-keys'); +import {HttpClient} from '../client'; + +export default HttpClient.prototype.updateChannel = async function(requestPayload: UpdateChannelRequestPayload) { + const response: ChannelPayload = await this.doFetchFromBackend(`channels.update`, { + channel_id: requestPayload.channelId, + name: requestPayload.name, + ...(requestPayload.imageUrl && { + image_url: requestPayload.imageUrl, + }), + }); + + return camelcaseKeys(response, {deep: true, stopPaths: ['metadata.userData']}); +}; diff --git a/lib/typescript/httpclient/payload/ConnectChatPluginRequestPayload.ts b/lib/typescript/httpclient/payload/ConnectChatPluginRequestPayload.ts new file mode 100644 index 0000000000..aa766a8915 --- /dev/null +++ b/lib/typescript/httpclient/payload/ConnectChatPluginRequestPayload.ts @@ -0,0 +1,4 @@ +export interface ConnectChatPluginRequestPayload { + name: string; + imageUrl?: string; +} diff --git a/lib/typescript/httpclient/payload/UpdateChannelRequestPayload.ts b/lib/typescript/httpclient/payload/UpdateChannelRequestPayload.ts new file mode 100644 index 0000000000..1264232e32 --- /dev/null +++ b/lib/typescript/httpclient/payload/UpdateChannelRequestPayload.ts @@ -0,0 +1,5 @@ +export interface UpdateChannelRequestPayload { + channelId: string; + name: string; + imageUrl?: string; +} diff --git a/lib/typescript/httpclient/payload/index.ts b/lib/typescript/httpclient/payload/index.ts index 990e8ef85a..ca96dc2671 100644 --- a/lib/typescript/httpclient/payload/index.ts +++ b/lib/typescript/httpclient/payload/index.ts @@ -1,22 +1,24 @@ +export * from './ChannelPayload'; +export * from './ChannelsPayload'; +export * from './ConfigPayload'; export * from './ConnectChannelRequestApiPayload'; export * from './ConnectChannelRequestPayload'; +export * from './ConnectChatPluginRequestPayload'; +export * from './ConversationPayload'; export * from './CreateTagRequestPayload'; export * from './DisconnectChannelRequestApiPayload'; export * from './DisconnectChannelRequestPayload'; export * from './ExploreChannelRequestPayload'; export * from './ListConversationsRequestPayload'; +export * from './ListMessagesRequestPayload'; export * from './ListTagsResponsePayload'; export * from './LoginViaEmailRequestPayload'; export * from './UserPayload'; +export * from './MessagePayload'; export * from './PaginatedPayload'; export * from './PaginatedResponse'; -export * from './MessagePayload'; -export * from './ChannelPayload'; -export * from './ChannelsPayload'; -export * from './TagPayload'; -export * from './ConversationPayload'; -export * from './ListMessagesRequestPayload'; +export * from './SendMessagesRequestPayload'; export * from './TagConversationRequestPayload'; +export * from './TagPayload'; export * from './UntagConversationRequestPayload'; -export * from './SendMessagesRequestPayload'; -export * from './ConfigPayload'; +export * from './UpdateChannelRequestPayload'; diff --git a/yarn.lock b/yarn.lock index c6053cf32e..3219743d5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,9 @@ "@airyhq/components@latest": - version "0.4.12" - resolved "https://registry.npmjs.org/@airyhq/components/-/components-0.4.12.tgz" - integrity sha512-uX3ykZgS+fMY5vlPCGpqmKtXjgL3c7t+xTbktTjipvtjktrNSH8i/7vBh4AKWn2LndwDNHKHnubUS6nJQhHs9w== + version "0.4.13" + resolved "https://registry.yarnpkg.com/@airyhq/components/-/components-0.4.13.tgz#c67a0d19dbf3e9559c861d3cc4fff5e34c4bd4bf" + integrity sha512-xU+Q2ueZd8agJ8rUXq4OmB4cogqpzMM5ndlYS/DmGOl5FlYG1VxqaADbGb7Z4G6qgCf1bpob3YqulbMT9jeiIg== dependencies: "@crello/react-lottie" "^0.0.9" emoji-mart "^3.0.0" @@ -1627,7 +1627,7 @@ "@crello/react-lottie@^0.0.9": version "0.0.9" - resolved "https://registry.yarnpkg.com/@crello/react-lottie/-/react-lottie-0.0.9.tgz" + resolved "https://registry.yarnpkg.com/@crello/react-lottie/-/react-lottie-0.0.9.tgz#919567c8e06a7e0d12029f33b4fec2bdf2b7f6b4" integrity sha512-dkAS/Nc3luAnuXg3OG4p5EXKb6vl/jmHyn7St7a+SN+WWX1sq1Gx7T2bU/sYDxn8SSUKn/R+37LwwxcQD7SU3A== dependencies: lottie-web "5.5.9" @@ -2661,7 +2661,7 @@ atob@^2.1.2: autosize@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/autosize/-/autosize-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/autosize/-/autosize-4.0.2.tgz#073cfd07c8bf45da4b9fd153437f5bafbba1e4c9" integrity sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA== aws-sign2@~0.7.0: @@ -3378,7 +3378,7 @@ component-emitter@^1.2.1: computed-style@~0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz#7f344fd8584b2e425bedca4a1afc0e300bb05d74" integrity sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ= concat-map@0.0.1: @@ -4418,7 +4418,7 @@ executable@^4.1.1: exenv@^1.2.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz" + resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50= exit-hook@^1.0.0: @@ -5824,7 +5824,7 @@ js-base64@^2.1.8: "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: @@ -6010,7 +6010,7 @@ levn@^0.4.1: line-height@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/line-height/-/line-height-0.3.1.tgz" + resolved "https://registry.yarnpkg.com/line-height/-/line-height-0.3.1.tgz#4b1205edde182872a5efa3c8f620b3187a9c54c9" integrity sha1-SxIF7d4YKHKl76PI9iCzGHqcVMk= dependencies: computed-style "~0.1.3" @@ -6182,14 +6182,14 @@ long@^4.0.0: loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" lottie-web@5.5.9: version "5.5.9" - resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.5.9.tgz" + resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.5.9.tgz#f8775e8c36dfada428f9acea826ab674750419a8" integrity sha512-3Zdxnuyi6WXnMj+0ZfwDd17EXCM87Hcbhd+sVFq6EPGfkVoGzoIkZt9OafcgXw4mzjyILOkPDLaBumrgGKoCaw== loud-rejection@^1.0.0: @@ -6850,7 +6850,7 @@ oauth-sign@~0.9.0: object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-copy@^0.1.0: @@ -7642,7 +7642,7 @@ raw-body@2.4.0: react-autosize-textarea@^7.1.0: version "7.1.0" - resolved "https://registry.yarnpkg.com/react-autosize-textarea/-/react-autosize-textarea-7.1.0.tgz" + resolved "https://registry.yarnpkg.com/react-autosize-textarea/-/react-autosize-textarea-7.1.0.tgz#902c84fc395a689ca3a484dfb6bc2be9ba3694d1" integrity sha512-BHpjCDkuOlllZn3nLazY2F8oYO1tS2jHnWhcjTWQdcKiiMU6gHLNt/fzmqMSyerR0eTdKtfSIqtSeTtghNwS+g== dependencies: autosize "^4.0.2" @@ -7685,7 +7685,7 @@ react-is@^16.6.0, react-is@^16.7.0: react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0: version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: @@ -7711,7 +7711,7 @@ react-markdown@^5.0.3: react-modal@^3.11.2: version "3.12.1" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.12.1.tgz" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.12.1.tgz#38c33f70d81c33d02ff1ed115530443a3dc2afd3" integrity sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA== dependencies: exenv "^1.2.0" @@ -9528,7 +9528,7 @@ vm-browserify@^1.0.1: warning@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== dependencies: loose-envify "^1.0.0" From 92291d80b522bfec15c646489343102522df863d Mon Sep 17 00:00:00 2001 From: Paulo Diniz <paulo.rc.diniz@gmail.com> Date: Wed, 3 Mar 2021 16:20:35 +0100 Subject: [PATCH 07/43] [#1126] /templates.info And /templates.update are returning 404 (#1128) * adds templates.info to the ingress * Fixes templates.update --- .../airy/core/api/admin/TemplatesController.java | 15 ++++++++++++--- .../payload/UpdateTemplateRequestPayload.java | 6 ++---- .../core/api/admin/TemplatesControllerTest.java | 11 +++++++++++ infrastructure/helm-chart/templates/ingress.yaml | 7 +++++++ 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java index 0ff6ceb3f3..aabc6604ba 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java @@ -89,14 +89,23 @@ ResponseEntity<?> listTemplates(@RequestBody @Valid ListTemplatesRequestPayload @PostMapping("/templates.update") ResponseEntity<?> updateTemplate(@RequestBody @Valid UpdateTemplateRequestPayload payload) throws JsonProcessingException { - final Template template = stores.getTemplate(payload.getName()); + final Template template = stores.getTemplate(payload.getId().toString()); if (template == null) { return ResponseEntity.notFound().build(); } - template.setContent(payload.getName()); - template.setContent(objectMapper.writeValueAsString(payload.getContent())); + if (payload.getName() != null) { + template.setName(payload.getName()); + } + + if (payload.getContent() != null) { + template.setContent(payload.getContent()); + } + + if (payload.getVariables() != null) { + template.setVariables(objectMapper.writeValueAsString(payload.getVariables())); + } try { stores.storeTemplate(template); diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java index 509753ec8a..50c7bbf856 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java @@ -15,9 +15,7 @@ public class UpdateTemplateRequestPayload { @NotNull private UUID id; - @NotNull private String name; - @Valid - @NotNull - private JsonNode content; + private String content; + private JsonNode variables; } diff --git a/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java b/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java index 54f2eefaa4..2aeafdb4b5 100644 --- a/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java +++ b/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java @@ -108,6 +108,17 @@ void canManageTemplates() throws Exception { .andExpect(jsonPath("$.data[0].id").value(is(templateId))) .andExpect(jsonPath("$.data[0].name").value(is(name))); + webTestHelper.post("/templates.update", "{\"id\":\"" + templateId + "\", \"name\": \"new-template-name\", \"content\": \"" + content + "\"}", "user-id") + .andExpect(status().isOk()) + .andExpect(jsonPath("$.id").value(is(templateId))) + .andExpect(jsonPath("$.content").value(is("{\"blueprint\":\"text\",\"payload\":\"[[salutation]]!\"}"))) + .andExpect(jsonPath("$.variables.en.salutation").value(is("Hello"))) + .andExpect(jsonPath("$.name").value(is("new-template-name"))); + + webTestHelper.post("/templates.info", "{\"id\":\"" + templateId + "\"}", "user-id") + .andExpect(status().isOk()) + .andExpect(jsonPath("$.name").value(is("new-template-name"))); + webTestHelper.post("/templates.list", "{}", "user-id") .andExpect(status().isOk()) .andExpect(jsonPath("$.data.length()", is(1))); diff --git a/infrastructure/helm-chart/templates/ingress.yaml b/infrastructure/helm-chart/templates/ingress.yaml index da1c9ede05..a857837043 100644 --- a/infrastructure/helm-chart/templates/ingress.yaml +++ b/infrastructure/helm-chart/templates/ingress.yaml @@ -197,6 +197,13 @@ spec: name: api-admin port: number: 80 + - path: /templates.info + pathType: Prefix + backend: + service: + name: api-admin + port: + number: 80 - path: /channels.facebook.connect pathType: Prefix backend: From 790db2e93924a3528e6fa0f67b64347d39cacbd0 Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Wed, 3 Mar 2021 17:13:53 +0100 Subject: [PATCH 08/43] =?UTF-8?q?[#983]=20The=20login=20call=20should=20no?= =?UTF-8?q?t=20send=20the=20auth=E2=80=A6=20(#1127)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …token closes #983 --- frontend/ui/src/InitializeAiryApi.ts | 4 ++-- frontend/ui/src/actions/user/index.ts | 2 ++ lib/typescript/httpclient/client.ts | 16 ++++++++++------ .../httpclient/endpoints/loginViaEmail.ts | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/frontend/ui/src/InitializeAiryApi.ts b/frontend/ui/src/InitializeAiryApi.ts index 279aeb4312..654e5c4049 100644 --- a/frontend/ui/src/InitializeAiryApi.ts +++ b/frontend/ui/src/InitializeAiryApi.ts @@ -2,7 +2,7 @@ import {HttpClient} from 'httpclient'; import {getAuthToken} from './cookies'; import {env} from './env'; import {store} from './store'; -import {logoutUserAction} from './actions/user'; +import {logoutUser} from './actions/user'; const authToken = getAuthToken(); @@ -10,5 +10,5 @@ export const HttpClientInstance = new HttpClient(authToken, `//${env.API_HOST}`, console.error('Unauthorized request, logging out user'); console.error(error); - store.dispatch(logoutUserAction()); + logoutUser()(store.dispatch); }); diff --git a/frontend/ui/src/actions/user/index.ts b/frontend/ui/src/actions/user/index.ts index 380b6e21cc..8687d6999e 100644 --- a/frontend/ui/src/actions/user/index.ts +++ b/frontend/ui/src/actions/user/index.ts @@ -3,6 +3,7 @@ import _, {Dispatch} from 'redux'; import {User, LoginViaEmailRequestPayload} from 'httpclient'; import {HttpClientInstance} from '../../InitializeAiryApi'; +import {clearUserData} from '../../cookies'; const SET_CURRENT_USER = '@@auth/SET_CURRENT_USER'; const USER_AUTH_ERROR = '@@auth/ERROR'; @@ -29,6 +30,7 @@ export function loginViaEmail(requestPayload: LoginViaEmailRequestPayload) { export function logoutUser() { return async (dispatch: Dispatch<any>) => { + clearUserData(); HttpClientInstance.token = null; dispatch(logoutUserAction()); }; diff --git a/lib/typescript/httpclient/client.ts b/lib/typescript/httpclient/client.ts index a2b172b139..24386fcd63 100644 --- a/lib/typescript/httpclient/client.ts +++ b/lib/typescript/httpclient/client.ts @@ -18,14 +18,14 @@ import {Tag, Message} from './model'; /* eslint-disable @typescript-eslint/no-var-requires */ const camelcaseKeys = require('camelcase-keys'); -const headers = { - Accept: 'application/json', -}; - export function isString(object: any) { return typeof object === 'string' || object instanceof String; } +type FetchOptions = { + ignoreAuthToken?: boolean; +}; + export class HttpClient { public readonly apiUrlConfig?: string; public token?: string; @@ -63,8 +63,12 @@ export class HttpClient { }; } - private async doFetchFromBackend(url: string, body?: Object): Promise<any> { - if (this.token) { + private async doFetchFromBackend(url: string, body?: Object, options?: FetchOptions): Promise<any> { + const headers = { + Accept: 'application/json', + }; + + if (options?.ignoreAuthToken != true && this.token) { headers['Authorization'] = `Bearer ${this.token}`; } if (!(body instanceof FormData)) { diff --git a/lib/typescript/httpclient/endpoints/loginViaEmail.ts b/lib/typescript/httpclient/endpoints/loginViaEmail.ts index 03af64ec71..36347f3e02 100644 --- a/lib/typescript/httpclient/endpoints/loginViaEmail.ts +++ b/lib/typescript/httpclient/endpoints/loginViaEmail.ts @@ -6,7 +6,7 @@ import {HttpClient} from '../client'; export default HttpClient.prototype.loginViaEmail = async function loginViaEmail( requestPayload: LoginViaEmailRequestPayload ) { - const response: UserPayload = await this.doFetchFromBackend('users.login', requestPayload); + const response: UserPayload = await this.doFetchFromBackend('users.login', requestPayload, {ignoreAuthToken: true}); return {...camelcaseKeys(response), displayName: `${response.first_name} ${response.last_name}`}; }; From 96e2506ef3c4868c064c893fa138e0506aef6ccf Mon Sep 17 00:00:00 2001 From: Paulo Diniz <paulo.rc.diniz@gmail.com> Date: Wed, 3 Mar 2021 17:20:00 +0100 Subject: [PATCH 09/43] [#1014] Deploy the helm charts (#1084) --- WORKSPACE | 4 + go.mod | 12 +- go.sum | 10 +- infrastructure/BUILD | 3 + infrastructure/cli/cmd/create/BUILD | 22 ++- infrastructure/cli/cmd/create/create.go | 33 +++- infrastructure/cli/cmd/create/helm.go | 209 +++++++++++++++++++++++ infrastructure/cli/go.mod | 12 +- infrastructure/cli/go.sum | 37 ++-- infrastructure/controller/go.mod | 6 +- infrastructure/controller/go.sum | 6 + infrastructure/defaults.yaml | 4 + infrastructure/lib/go/k8s/handler/go.mod | 6 +- infrastructure/lib/go/k8s/handler/go.sum | 6 + infrastructure/lib/go/k8s/util/go.mod | 4 +- infrastructure/scripts/provision/core.sh | 17 +- tools/update-deps/go.mod | 2 +- tools/update-deps/go.sum | 1 + 18 files changed, 331 insertions(+), 63 deletions(-) create mode 100644 infrastructure/BUILD create mode 100644 infrastructure/cli/cmd/create/helm.go create mode 100644 infrastructure/defaults.yaml diff --git a/WORKSPACE b/WORKSPACE index 94a8823417..9555948cea 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -130,6 +130,10 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe go_rules_dependencies() +load("@io_bazel_rules_go//extras:embed_data_deps.bzl", "go_embed_data_dependencies") + +go_embed_data_dependencies() + go_register_toolchains(nogo = "@//:airy_nogo") # my_nogo is in the top-level BUILD file of this workspace load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") diff --git a/go.mod b/go.mod index 55ee1fe117..31572bbdcb 100644 --- a/go.mod +++ b/go.mod @@ -9,19 +9,19 @@ require ( github.com/alicebob/miniredis/v2 v2.13.3 github.com/go-redis/redis/v8 v8.2.2 github.com/spf13/cobra v1.1.1 + github.com/imdario/mergo v0.3.11 // indirect github.com/kr/pretty v0.2.1 github.com/mitchellh/go-homedir v1.1.0 + github.com/spf13/cast v1.3.1 // indirect github.com/spf13/viper v1.7.1 - github.com/stretchr/testify v1.6.1 - github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect - github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect goji.io v2.0.2+incompatible gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 - k8s.io/client-go v0.20.0 + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 + k8s.io/client-go v0.20.1 k8s.io/klog v1.0.0 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect + github.com/stretchr/testify v1.6.1 golang.org/x/mod v0.4.1 ) diff --git a/go.sum b/go.sum index 2af47b6126..5ca50f272d 100644 --- a/go.sum +++ b/go.sum @@ -175,6 +175,7 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -260,6 +261,7 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -276,9 +278,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -524,9 +524,9 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= -k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= diff --git a/infrastructure/BUILD b/infrastructure/BUILD new file mode 100644 index 0000000000..447ef02f2f --- /dev/null +++ b/infrastructure/BUILD @@ -0,0 +1,3 @@ +exports_files([ + "defaults.yaml", +]) diff --git a/infrastructure/cli/cmd/create/BUILD b/infrastructure/cli/cmd/create/BUILD index bb5cf52277..d456a22644 100644 --- a/infrastructure/cli/cmd/create/BUILD +++ b/infrastructure/cli/cmd/create/BUILD @@ -1,14 +1,34 @@ load("@com_github_airyhq_bazel_tools//lint:buildifier.bzl", "check_pkg") load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data") + +go_embed_data( + name = "data", + src = "//infrastructure:defaults.yaml", + package = "create", + string = True, +) go_library( name = "create", - srcs = ["create.go"], + srcs = [ + "create.go", + "helm.go", + ":data", # keep + ], importpath = "cli/cmd/create", visibility = ["//visibility:public"], deps = [ "@com_github_spf13_cobra//:cobra", "@com_github_spf13_viper//:viper", + "@io_k8s_api//batch/v1:go_default_library", + "@io_k8s_api//core/v1:go_default_library", + "@io_k8s_api//rbac/v1:go_default_library", + "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library", + "@io_k8s_apimachinery//pkg/watch:go_default_library", + "@io_k8s_client_go//kubernetes:go_default_library", + "@io_k8s_client_go//tools/clientcmd:go_default_library", + "@io_k8s_client_go//util/homedir:go_default_library", ], ) diff --git a/infrastructure/cli/cmd/create/create.go b/infrastructure/cli/cmd/create/create.go index bc3475c987..fc1b2f1af4 100644 --- a/infrastructure/cli/cmd/create/create.go +++ b/infrastructure/cli/cmd/create/create.go @@ -4,11 +4,16 @@ import ( "fmt" "github.com/spf13/cobra" "github.com/spf13/viper" + "k8s.io/client-go/util/homedir" + "os" + "path/filepath" ) var ( - provider string - CreateCmd = &cobra.Command{ + provider string + kubeConfig string + version string + CreateCmd = &cobra.Command{ Use: "create", Short: "Creates an instance of Airy Core", Long: ``, @@ -16,13 +21,37 @@ var ( } ) +const defaultKubeConfig = "$HOME/.kube/config" + func init() { + if home := homedir.HomeDir(); home != "" { + CreateCmd.Flags().StringVar(&kubeConfig, "kubeconfig", defaultKubeConfig, "(optional) absolute path to the kubeconfig file") + } else { + CreateCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "absolute path to the kubeconfig file") + } + CreateCmd.Flags().StringVar(&provider, "provider", "", "One of the supported providers (aws|local). Default is aws") + CreateCmd.Flags().MarkHidden("kubeconfig") + viper.SetDefault("provider", "aws") } func create(cmd *cobra.Command, args []string) { fmt.Println("⚙️ Creating core with provider", provider) + + if kubeConfig == defaultKubeConfig { + kubeConfig = filepath.Join(homedir.HomeDir(), ".kube", "config") + } + + helm := New(kubeConfig, "develop", "default") + if err := helm.Setup(); err != nil { + fmt.Println("setting up Helm failed with err: ", err) + os.Exit(1) + } + if err := helm.InstallCharts(); err != nil { + fmt.Println("installing Helm charts failed with err: ", err) + os.Exit(1) + } fmt.Println("🚀 Starting core with default components") fmt.Println("🎉 Your Airy Core is ready") fmt.Println("\t Link to the API") diff --git a/infrastructure/cli/cmd/create/helm.go b/infrastructure/cli/cmd/create/helm.go new file mode 100644 index 0000000000..a06563cb6b --- /dev/null +++ b/infrastructure/cli/cmd/create/helm.go @@ -0,0 +1,209 @@ +package create + +import ( + "context" + "fmt" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "os" +) + +const airyConfigMap = "airy-config-map" +const serviceAccountName = "helm-account" + +type Helm struct { + name string + version string + namespace string + clientset *kubernetes.Clientset +} + +func New(kubeConfigPath string, version string, namespace string) Helm { + config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) + if err != nil { + fmt.Println("Building kubeconfig failed with error: ", err) + os.Exit(1) + } + + clientSet, clientSetErr := kubernetes.NewForConfig(config) + if clientSetErr != nil { + fmt.Println("Building kubernetes client failed: ", err) + os.Exit(1) + } + + return Helm{ + name: "helm-runner", + namespace: namespace, + version: version, + clientset: clientSet, + } +} + +func (h *Helm) Setup() error { + accountClient := h.clientset.CoreV1().ServiceAccounts(h.namespace) + + account := &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: serviceAccountName, + Namespace: h.namespace, + }, + } + _, err := accountClient.Create(context.TODO(), account, metav1.CreateOptions{}) + if err != nil { + return err + } + + roleBindingClient := h.clientset.RbacV1().ClusterRoleBindings() + + roleBinding := &rbacv1.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: "helm-account-binding", + Namespace: h.namespace, + }, + Subjects: []rbacv1.Subject{{ + Namespace: h.namespace, + Kind: "ServiceAccount", + Name: serviceAccountName, + }}, + RoleRef: rbacv1.RoleRef{ + Kind: "ClusterRole", + Name: "cluster-admin", + }, + } + + _, err = roleBindingClient.Create(context.TODO(), roleBinding, metav1.CreateOptions{}) + if err != nil { + return err + } + + return nil +} + +func (h *Helm) InstallCharts() error { + return h.runHelm([]string{"install", "--values", "/apps/config/airy-config-map.yaml", "core", "/apps/helm-chart/"}) +} + +func (h *Helm) runHelm(args []string) error { + if err := h.upsertAiryConfigMap(); err != nil { + return err + } + + h.cleanupJob() + jobsClient := h.clientset.BatchV1().Jobs(h.namespace) + + job := &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{ + Name: h.name, + Namespace: h.namespace, + Labels: map[string]string{"helm-runner": "true"}, + }, + Spec: batchv1.JobSpec{ + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "helm-runner", + Image: "ghcr.io/airyhq/infrastructure/helm:" + h.version, + Args: args, + ImagePullPolicy: corev1.PullAlways, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "core-config", + MountPath: "/apps/config", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: "core-config", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: airyConfigMap, + }, + }, + }, + }, + }, + RestartPolicy: "Never", + ServiceAccountName: serviceAccountName, + }, + }, + }, + } + + _, err := jobsClient.Create(context.TODO(), job, v1.CreateOptions{}) + if err != nil { + return err + } + + watcher, err := jobsClient.Watch(context.TODO(), v1.ListOptions{ + LabelSelector: "helm-runner=true", + }) + if err != nil { + return err + } + + ch := watcher.ResultChan() + + for event := range ch { + switch event.Type { + case watch.Error: + h.cleanupJob() + return fmt.Errorf("helm run failed with error %v", event.Object) + case watch.Added: + case watch.Modified: + job, _ := event.Object.(*batchv1.Job) + if job.Status.Succeeded == 1 { + h.cleanupJob() + return nil + } else if job.Status.Failed == 1 { + h.cleanupJob() + return fmt.Errorf("helm run failed with error %v", event.Object) + } + } + } + + return nil +} + +// Create/update airy config map +func (h *Helm) upsertAiryConfigMap() error { + cm, _ := h.clientset.CoreV1().ConfigMaps(h.namespace).Get(context.TODO(), airyConfigMap, v1.GetOptions{}) + + cmData := map[string]string{ + "airy-config-map.yaml": Data, + } + + if cm.GetName() != "" { + cm.Data = cmData + _, err := h.clientset.CoreV1().ConfigMaps(h.namespace).Update(context.TODO(), cm, v1.UpdateOptions{}) + return err + } + + _, err := h.clientset.CoreV1().ConfigMaps(h.namespace).Create(context.TODO(), + &corev1.ConfigMap{ + ObjectMeta: v1.ObjectMeta{ + Name: airyConfigMap, + Namespace: h.namespace, + }, + Data: cmData, + }, v1.CreateOptions{}) + return err +} + +func (h *Helm) cleanupJob() error { + jobsClient := h.clientset.BatchV1().Jobs(h.namespace) + + deletionPolicy := v1.DeletePropagationBackground + return jobsClient.Delete(context.TODO(), h.name, v1.DeleteOptions{ + PropagationPolicy: &deletionPolicy, + }) +} diff --git a/infrastructure/cli/go.mod b/infrastructure/cli/go.mod index d065803c3a..314f83bbd5 100644 --- a/infrastructure/cli/go.mod +++ b/infrastructure/cli/go.mod @@ -4,19 +4,17 @@ go 1.15 require ( github.com/airyhq/airy/lib/go/httpclient v0.0.0 + github.com/imdario/mergo v0.3.11 // indirect github.com/kr/pretty v0.2.1 github.com/mitchellh/go-homedir v1.1.0 + github.com/spf13/cast v1.3.1 // indirect github.com/spf13/cobra v1.1.1 github.com/spf13/viper v1.7.1 - github.com/stretchr/testify v1.6.1 - github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect - github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect goji.io v2.0.2+incompatible gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 - k8s.io/client-go v0.20.0 - + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 + k8s.io/client-go v0.20.1 ) replace github.com/airyhq/airy/lib/go/httpclient => ../../lib/go/httpclient diff --git a/infrastructure/cli/go.sum b/infrastructure/cli/go.sum index 6468f7080d..0b217f2dc5 100644 --- a/infrastructure/cli/go.sum +++ b/infrastructure/cli/go.sum @@ -31,6 +31,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -55,13 +56,9 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -133,6 +130,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= @@ -180,8 +178,9 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -261,13 +260,9 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -279,8 +274,9 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -303,9 +299,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -474,6 +468,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -529,8 +524,8 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -545,6 +540,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= @@ -555,15 +551,12 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= -k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= -k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= -k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= -k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= -k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= -k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= -k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= diff --git a/infrastructure/controller/go.mod b/infrastructure/controller/go.mod index 716f04f45e..dc0e56812f 100644 --- a/infrastructure/controller/go.mod +++ b/infrastructure/controller/go.mod @@ -5,9 +5,9 @@ go 1.15 require ( github.com/airyhq/airy/infrastructure/lib/go/k8s/handler v0.0.0 github.com/airyhq/airy/infrastructure/lib/go/k8s/util v0.0.0 - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 - k8s.io/client-go v0.20.0 + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 + k8s.io/client-go v0.20.1 k8s.io/klog v1.0.0 ) diff --git a/infrastructure/controller/go.sum b/infrastructure/controller/go.sum index ab10246b92..0d3f6aaa79 100644 --- a/infrastructure/controller/go.sum +++ b/infrastructure/controller/go.sum @@ -651,10 +651,16 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= diff --git a/infrastructure/defaults.yaml b/infrastructure/defaults.yaml new file mode 100644 index 0000000000..41416beb6e --- /dev/null +++ b/infrastructure/defaults.yaml @@ -0,0 +1,4 @@ +global: + appImageTag: develop + containerRegistry: ghcr.io/airyhq + namespace: default diff --git a/infrastructure/lib/go/k8s/handler/go.mod b/infrastructure/lib/go/k8s/handler/go.mod index 3ddbaae87a..ed919ae04e 100644 --- a/infrastructure/lib/go/k8s/handler/go.mod +++ b/infrastructure/lib/go/k8s/handler/go.mod @@ -5,9 +5,9 @@ go 1.15 require ( github.com/airyhq/airy/infrastructure/lib/go/k8s/util v0.0.0 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 - k8s.io/client-go v0.20.0 + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 + k8s.io/client-go v0.20.1 k8s.io/klog v1.0.0 k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect ) diff --git a/infrastructure/lib/go/k8s/handler/go.sum b/infrastructure/lib/go/k8s/handler/go.sum index be79c23af4..484ab4820a 100644 --- a/infrastructure/lib/go/k8s/handler/go.sum +++ b/infrastructure/lib/go/k8s/handler/go.sum @@ -654,10 +654,16 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= diff --git a/infrastructure/lib/go/k8s/util/go.mod b/infrastructure/lib/go/k8s/util/go.mod index 15d179076c..889399fb2a 100644 --- a/infrastructure/lib/go/k8s/util/go.mod +++ b/infrastructure/lib/go/k8s/util/go.mod @@ -3,7 +3,7 @@ module github.com/airyhq/airy/infrastructure/lib/go/k8s/util go 1.15 require ( - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 k8s.io/klog v1.0.0 ) diff --git a/infrastructure/scripts/provision/core.sh b/infrastructure/scripts/provision/core.sh index 1f79c0b12e..a3285de9b7 100755 --- a/infrastructure/scripts/provision/core.sh +++ b/infrastructure/scripts/provision/core.sh @@ -14,14 +14,9 @@ wait-for-service-account echo "Deploying Airy Core with the ${AIRY_VERSION} image tag" -if [[ -f "${INFRASTRUCTURE_PATH}"/airy.yaml ]]; then - yq eval '.global.appImageTag="'"${AIRY_VERSION}"'"' -i "${INFRASTRUCTURE_PATH}"/airy.yaml - helm install core "${INFRASTRUCTURE_PATH}"/helm-chart/ --values "${INFRASTRUCTURE_PATH}"/airy.yaml --set global.ngrokEnabled="${NGROK_ENABLED}" --timeout 1000s > /dev/null 2>&1 - wget -qnv https://airy-core-binaries.s3.amazonaws.com/"${AIRY_VERSION}"/linux/amd64/airy - chmod +x airy - mv airy /usr/local/bin/ - airy init - airy config apply --kube-config /etc/rancher/k3s/k3s.yaml --config "${INFRASTRUCTURE_PATH}"/airy.yaml -else - helm install core "${INFRASTRUCTURE_PATH}"/helm-chart/ --set global.appImageTag="${AIRY_VERSION}" --set global.ngrokEnabled="${NGROK_ENABLED}" --timeout 1000s > /dev/null 2>&1 -fi +wget -qnv https://airy-core-binaries.s3.amazonaws.com/"${AIRY_VERSION}"/linux/amd64/airy +chmod +x airy +mv airy /usr/local/bin/ +airy init +airy create --kubeconfig /etc/rancher/k3s/k3s.yaml +airy config apply --kube-config /etc/rancher/k3s/k3s.yaml --config "${INFRASTRUCTURE_PATH}"/airy.yaml diff --git a/tools/update-deps/go.mod b/tools/update-deps/go.mod index a6b0c0c997..04b76ddd18 100644 --- a/tools/update-deps/go.mod +++ b/tools/update-deps/go.mod @@ -4,5 +4,5 @@ go 1.15 require ( golang.org/x/mod v0.4.1 - k8s.io/apimachinery v0.20.0 + k8s.io/apimachinery v0.20.1 ) diff --git a/tools/update-deps/go.sum b/tools/update-deps/go.sum index 84859e3bae..0b2452cb9d 100644 --- a/tools/update-deps/go.sum +++ b/tools/update-deps/go.sum @@ -167,6 +167,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 0d3260e7408a1185c0db3c58d47240598bf49daa Mon Sep 17 00:00:00 2001 From: lucapette <ciao@lucapette.me> Date: Wed, 3 Mar 2021 17:47:29 +0100 Subject: [PATCH 10/43] [#1094] Minor UI improvements to the docs (#1131) Fixes #1094 --- docs/docs/api/introduction.md | 12 ++-- docs/docs/apps/ui/introduction.md | 12 ++-- .../installation/introduction.md | 9 ++- .../installation/production.md | 6 ++ docs/docs/getting-started/introduction.md | 60 ++++++++++++++----- docs/docs/getting-started/quickstart.md | 15 ++--- .../components/ButtonBox/styles.module.css | 2 + docs/static/icons/desktop-computer.svg | 9 +++ docs/static/icons/diamond.svg | 13 +++- docs/static/icons/electric-plug.svg | 9 +++ docs/static/icons/fishing-pole.svg | 11 ++++ docs/static/icons/gear.svg | 7 +++ docs/static/icons/hammer-and-wrench.svg | 15 +++++ docs/static/icons/high-voltage.svg | 5 ++ docs/static/icons/kafka.svg | 1 + docs/static/icons/label.svg | 5 ++ docs/static/icons/rocket.svg | 10 ++++ docs/static/icons/speech-balloon.svg | 10 ++++ 18 files changed, 170 insertions(+), 41 deletions(-) create mode 100644 docs/static/icons/desktop-computer.svg create mode 100644 docs/static/icons/electric-plug.svg create mode 100644 docs/static/icons/fishing-pole.svg create mode 100644 docs/static/icons/gear.svg create mode 100644 docs/static/icons/hammer-and-wrench.svg create mode 100644 docs/static/icons/high-voltage.svg create mode 100644 docs/static/icons/kafka.svg create mode 100644 docs/static/icons/label.svg create mode 100644 docs/static/icons/rocket.svg create mode 100644 docs/static/icons/speech-balloon.svg diff --git a/docs/docs/api/introduction.md b/docs/docs/api/introduction.md index 251336cc51..8919878034 100644 --- a/docs/docs/api/introduction.md +++ b/docs/docs/api/introduction.md @@ -6,9 +6,9 @@ sidebar_label: Introduction import TLDR from "@site/src/components/TLDR"; import ButtonBoxList from "@site/src/components/ButtonBoxList"; import ButtonBox from "@site/src/components/ButtonBox"; -import BoltSVG from "@site/static/icons/bolt.svg"; -import ServerStackSVG from "@site/static/icons/server-stack.svg"; -import WebhooksSVG from "@site/static/icons/webhooks.svg"; +import HighVoltageSVG from "@site/static/icons/high-voltage.svg"; +import ElectricPlugSVG from "@site/static/icons/electric-plug.svg"; +import FishingPoleSVG from "@site/static/icons/fishing-pole.svg"; <TLDR> @@ -27,19 +27,19 @@ interacting with data: <ButtonBoxList> <ButtonBox - icon={() => <BoltSVG />} + icon={() => <HighVoltageSVG />} title='HTTP API' description='Access your conversational data with blazing fast HTTP endpoints' link='api/endpoints/introduction' /> <ButtonBox - icon={() => <ServerStackSVG />} + icon={() => <ElectricPlugSVG />} title='WebSocket Server' description='Power real-time applications with STOMP style WebSocket' link='api/websocket' /> <ButtonBox - icon={() => <WebhooksSVG />} + icon={() => <FishingPoleSVG />} title='Webhook' description='Participate programmatically in conversations by listening to events' link='api/webhook' diff --git a/docs/docs/apps/ui/introduction.md b/docs/docs/apps/ui/introduction.md index f92e0ee9f2..0a951e0246 100644 --- a/docs/docs/apps/ui/introduction.md +++ b/docs/docs/apps/ui/introduction.md @@ -6,9 +6,9 @@ sidebar_label: Introduction import useBaseUrl from '@docusaurus/useBaseUrl'; import ButtonBoxList from "@site/src/components/ButtonBoxList"; import ButtonBox from "@site/src/components/ButtonBox"; -import CogSVG from "@site/static/icons/cog.svg"; -import InboxSVG from "@site/static/icons/prototype.svg"; -import TagsSVG from "@site/static/icons/price-tag.svg"; +import GearSVG from "@site/static/icons/gear.svg"; +import DesktopComputerSVG from "@site/static/icons/desktop-computer.svg"; +import LabelSVG from "@site/static/icons/label.svg"; import UsersSVG from "@site/static/icons/users.svg"; import ComponentsSVG from "@site/static/icons/information-architecture.svg"; @@ -21,19 +21,19 @@ Additional features like [Filters, Search](inbox) and [Tags](tags) help you. <ButtonBoxList> <ButtonBox - icon={() => <CogSVG />} + icon={() => <GearSVG />} title='UI Quickstart' description='Step by Step Guide on getting up and running with the UI' link='apps/ui/quickstart' /> <ButtonBox - icon={() => <InboxSVG />} + icon={() => <DesktopComputerSVG />} title='Inbox' description='One inbox to see all your conversations & respond to them' link='apps/ui/inbox' /> <ButtonBox - icon={() => <TagsSVG />} + icon={() => <LabelSVG />} title='Tags' description='Tag your conversations for easy filtering, searching & segmenting' link='apps/ui/tags' diff --git a/docs/docs/getting-started/installation/introduction.md b/docs/docs/getting-started/installation/introduction.md index 840d9946eb..b71681a6f2 100644 --- a/docs/docs/getting-started/installation/introduction.md +++ b/docs/docs/getting-started/installation/introduction.md @@ -8,8 +8,8 @@ import TLDR from "@site/src/components/TLDR"; import ButtonBoxList from "@site/src/components/ButtonBoxList"; import ButtonBox from "@site/src/components/ButtonBox"; import VagrantSVG from "@site/static/icons/vagrant.svg"; -import ProductionSVG from "@site/static/icons/cloud.svg"; -import DeploySVG from "@site/static/icons/deploy.svg"; +import KafkaSVG from "@site/static/icons/kafka.svg"; +import RocketSVG from "@site/static/icons/rocket.svg"; <TLDR> @@ -26,12 +26,11 @@ easy to install and works on macOS, Windows, and Linux. <ButtonBoxList> <ButtonBox -icon={() => <DeploySVG />} +icon={() => <RocketSVG />} title='CLI' description='Install the Airy Core CLI application' link='/cli/installation' /> - <ButtonBox icon={() => <VagrantSVG />} title='Local test environment with Vagrant' @@ -39,7 +38,7 @@ description='Step by step guide to run Airy Core on your local machine' link='getting-started/installation/vagrant' /> <ButtonBox -icon={() => <ProductionSVG />} +icon={() => <KafkaSVG />} title='Production ready environment with Kafka' description='Manual step by step guide for running Airy Core in production' link='getting-started/installation/production' diff --git a/docs/docs/getting-started/installation/production.md b/docs/docs/getting-started/installation/production.md index 5d4618ad1d..af7b5fc5be 100644 --- a/docs/docs/getting-started/installation/production.md +++ b/docs/docs/getting-started/installation/production.md @@ -3,6 +3,12 @@ title: Production sidebar_label: Production --- +import TLDR from "@site/src/components/TLDR"; + +<TLDR> +Run Airy Core in a production environment with Kafka +</TLDR> + This document provides our recommendations on how to run the Airy Core in production environments. If you are not familiar with the architecture of the system, we suggest you read the [Architecture](/concepts/architecture.md) document before diff --git a/docs/docs/getting-started/introduction.md b/docs/docs/getting-started/introduction.md index afa7edc9a4..c3ff5d2e8a 100644 --- a/docs/docs/getting-started/introduction.md +++ b/docs/docs/getting-started/introduction.md @@ -7,8 +7,13 @@ slug: / import TLDR from "@site/src/components/TLDR"; import ButtonBoxList from "@site/src/components/ButtonBoxList"; import ButtonBox from "@site/src/components/ButtonBox"; -import DeploySVG from "@site/static/icons/deploy.svg"; +import RocketSVG from "@site/static/icons/rocket.svg"; import DiamondSVG from "@site/static/icons/diamond.svg"; +import SpeechBalloonSVG from "@site/static/icons/speech-balloon.svg"; +import HighVoltageSVG from "@site/static/icons/high-voltage.svg"; +import ElectricPlugSVG from "@site/static/icons/electric-plug.svg"; +import FishingPoleSVG from "@site/static/icons/fishing-pole.svg"; +import GearSVG from "@site/static/icons/gear.svg"; ## What is Airy Core? @@ -44,7 +49,7 @@ conversational data to wherever you need it. <ButtonBoxList> <ButtonBox - icon={() => <DeploySVG />} + icon={() => <RocketSVG />} title='Start Installation' description='Install Airy with our CLI, locally or in the cloud' link='cli/installation' @@ -73,16 +78,41 @@ We'll guide you through the following journey: The platform contains the following core components: -- An ingestion platform that heavily relies on Apache Kafka to process incoming - webhook data from different sources. We make sense of the data and reshape it - into source independent contacts, conversations, and messages (see our - glossary for formal definitions). - -- An HTTP API that allows you to manage the data sets the platform handles. - -- A webhook integration server that allows you to programmatically participate - in conversations by sending messages. The webhook integration exposes events - you can "listen" to and react programmatically. - -- A WebSocket server that allows you to receive near real-time updates about the - data flowing through the system. +<ButtonBoxList> +<ButtonBox + icon={() => <SpeechBalloonSVG />} + title='Connectors for all conversational sources' + description="Connect anything from our free open-source live chat plugin, Facebook Messenger, Google's Business Messages to your Airy Core. This is all possible through an ingestion platform that heavily relies on Apache Kafka to process incoming webhook data from different sources. We make sense of the data and reshape it into source independent contacts, conversations, and messages." + link='/sources/introduction' +/> +<ButtonBox + icon={() => <HighVoltageSVG />} + title='APIs to access your data' + description="An API to access conversational data with blazing fast HTTP endpoints." + link='/api/endpoints/introduction' +/> +<ButtonBox + icon={() => <ElectricPlugSVG />} + title='WebSockets to power real-time applications' + description="A WebSocket server that allows clients to receive near real-time updates about data flowing through the system." + link='/api/websocket' +/> +<ButtonBox + icon={() => <FishingPoleSVG />} + title='Webhook integration to connect custom apps' + description="A webhook integration server that allows its users to programmatically participate in conversations by sending messages (the webhook integration exposes events users can listen to and react programmatically.)" + link='/api/webhook' +/> +<ButtonBox + icon={() => <DiamondSVG />} + title='UI: From an inbox to dashboards' + description="Not every message can be handled by code, this is why Airy comes with different UIs ready for you and your teams to use." + link='/apps/ui/introduction' +/> +<ButtonBox + icon={() => <GearSVG />} + title='Integrations' + description="Pre-made integrations into popular conversational tools, for example NLP tools like Rasa" + link='/integrations/rasa' +/> +</ButtonBoxList> diff --git a/docs/docs/getting-started/quickstart.md b/docs/docs/getting-started/quickstart.md index df5f6fb305..760375a472 100644 --- a/docs/docs/getting-started/quickstart.md +++ b/docs/docs/getting-started/quickstart.md @@ -5,6 +5,8 @@ sidebar_label: Quickstart import useBaseUrl from '@docusaurus/useBaseUrl'; import TLDR from "@site/src/components/TLDR"; +import ButtonBox from "@site/src/components/ButtonBox"; +import RocketSVG from "@site/static/icons/rocket.svg"; <TLDR> @@ -22,13 +24,12 @@ directly in Apache Kafka. - [Step 3: Use the HTTP API to list conversations](#step-3-use-the-http-api-to-list-conversations) - [Step 4: Consume directly from Apache Kafka](#step-4-consume-directly-from-apache-kafka) -:::info - -To get going with the Quickstart, [you must install Airy -first](/getting-started/installation/introduction.md). Once you installed Airy and have the -CLI up and running you are good to go. - -::: +<ButtonBox +icon={() => <RocketSVG />} +title='Did you already install the Airy CLI?' +description='To get going with the Quickstart, you must install Airy first. Once the CLI is up and running you are good to go.' +link='/getting-started/installation/introduction' +/> ## Step 1: How to setup your first source diff --git a/docs/src/components/ButtonBox/styles.module.css b/docs/src/components/ButtonBox/styles.module.css index 92eb8007bd..b5f98710aa 100644 --- a/docs/src/components/ButtonBox/styles.module.css +++ b/docs/src/components/ButtonBox/styles.module.css @@ -57,6 +57,7 @@ .containerLight svg { height: 32px; width: 32px; + min-width: 32px; margin-right: 12px; fill: black; } @@ -64,6 +65,7 @@ .containerDark svg { height: 32px; width: 32px; + min-width: 32px; margin-right: 12px; fill: white; } diff --git a/docs/static/icons/desktop-computer.svg b/docs/static/icons/desktop-computer.svg new file mode 100644 index 0000000000..e527d0fbcb --- /dev/null +++ b/docs/static/icons/desktop-computer.svg @@ -0,0 +1,9 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M63.1941,56H9.2323c-2.8026,0-5.0746-2.272-5.0746-5.0746V16.033c0-2.8026,2.272-5.0746,5.0746-5.0746h53.9618 c2.8026,0,5.0746,2.272,5.0746,5.0746v34.8924C68.2687,53.728,65.9967,56,63.1941,56z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="0.9187" d="M68.2687,47.5629c0,0,0.1688,4.8556-1.5499,6.8305s-0.7221,1.6035-3.5247,1.6035H9.2323c-2.8026,0-4.164-1.852-4.164-2.4434 l-0.9106-5.9906"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M63.1941,56H9.2323c-2.8026,0-5.0746-2.272-5.0746-5.0746V16.033c0-2.8026,2.272-5.0746,5.0746-5.0746h53.9618 c2.8026,0,5.0746,2.272,5.0746,5.0746v34.8924C68.2687,53.728,65.9967,56,63.1941,56z"/> + <line x1="7.2132" x2="65.2132" y1="48.4924" y2="48.4924" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M43.1833,60.9583c0,4.9583,8.8401,7.0417,8.8401,7.0417H36.4029h-0.3795H20.4029c0,0,8.8401-2.0833,8.8401-7.0417"/> + </g> +</svg> diff --git a/docs/static/icons/diamond.svg b/docs/static/icons/diamond.svg index b43d90cdfe..356f4c39ec 100644 --- a/docs/static/icons/diamond.svg +++ b/docs/static/icons/diamond.svg @@ -1,3 +1,12 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#FFFFFF"> - <path d="M17.0898,8.9999 L17.7848,4.8299 L20.5658,8.9999 L17.0898,8.9999 Z M16.8358,9.9999 L20.4068,9.9999 L13.6208,17.8579 L16.8358,9.9999 Z M7.1638,9.9999 L10.3788,17.8579 L3.5918,9.9999 L7.1638,9.9999 Z M6.9098,8.9999 L3.4338,8.9999 L6.2148,4.8299 L6.9098,8.9999 Z M7.8008,8.2649 L7.0898,3.9999 L10.9998,3.9999 L7.8008,8.2649 Z M12.9998,3.9999 L16.9098,3.9999 L16.1988,8.2649 L12.9998,3.9999 Z M8.4998,8.9999 L11.9998,4.3329 L15.4998,8.9999 L8.4998,8.9999 Z M15.7548,9.9999 L11.9998,19.1799 L8.2448,9.9999 L15.7548,9.9999 Z M21.9158,9.2229 L17.9158,3.2229 C17.9148,3.2209 17.9118,3.2199 17.9108,3.2179 C17.8688,3.1569 17.8138,3.1069 17.7478,3.0699 C17.7288,3.0589 17.7078,3.0559 17.6888,3.0469 C17.6528,3.0329 17.6208,3.0129 17.5818,3.0069 C17.5658,3.0039 17.5498,3.0099 17.5328,3.0079 C17.5218,3.0079 17.5118,2.9999 17.4998,2.9999 L6.4998,2.9999 C6.4878,2.9999 6.4778,3.0079 6.4658,3.0079 C6.4498,3.0099 6.4348,3.0039 6.4178,3.0069 C6.3788,3.0129 6.3468,3.0329 6.3118,3.0469 C6.2918,3.0559 6.2708,3.0589 6.2528,3.0699 C6.1868,3.1069 6.1308,3.1569 6.0898,3.2179 C6.0878,3.2199 6.0858,3.2209 6.0838,3.2229 L2.0838,9.2229 C1.9598,9.4099 1.9748,9.6569 2.1218,9.8269 L11.6218,20.8269 C11.6428,20.8519 11.6718,20.8629 11.6968,20.8829 C11.7188,20.8999 11.7378,20.9189 11.7628,20.9319 C11.9118,21.0139 12.0878,21.0139 12.2368,20.9319 C12.2618,20.9189 12.2808,20.8999 12.3028,20.8829 C12.3278,20.8629 12.3568,20.8519 12.3788,20.8269 L21.8788,9.8269 C22.0258,9.6569 22.0408,9.4099 21.9158,9.2229 L21.9158,9.2229 Z"/> +<svg id="emoji" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M45.8743,51.5138"/> + <polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="56.3771,11.9798 16.3771,11.9798 4,23.3481 36,64.0837 68,23.3481"/> + <polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="55.7486,23.8595 36,64.0837 36,24.3482 36,11.9798 16.2556,23.3482"/> + <line x1="16.2556" x2="36.0042" y1="23.8595" y2="64.0837" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <path stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M36,23.3482"/> + <line x1="4" x2="68" y1="23.3482" y2="23.3482" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <line x1="36" x2="55.7486" y1="11.9798" y2="23.3482" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="56.3771,11.9798 16.3771,11.9798 4,23.3481 36,64.0837 68,23.3481"/> + </g> </svg> diff --git a/docs/static/icons/electric-plug.svg b/docs/static/icons/electric-plug.svg new file mode 100644 index 0000000000..a70bc40b99 --- /dev/null +++ b/docs/static/icons/electric-plug.svg @@ -0,0 +1,9 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M33.013,23.0925V8.2105 c0-1.8264-1.4806-3.307-3.307-3.307h0l0,0c-1.8264,0-3.307,1.4806-3.307,3.307l0,0v14.883"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M49.55,23.0925V8.2105 c0-1.8264-1.4806-3.307-3.307-3.307h0l0,0c-1.8264,0-3.307,1.4806-3.307,3.307l0,0v14.883"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.435,23.1885v11.48 c0,10.0461,8.1439,18.19,18.19,18.19s18.19-8.144,18.19-18.19v-11.48H19.435z"/> + <polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="31.011,51.8095 32.665,58.0005 42.586,58.0005 44.24,51.8335"/> + <polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="33.618,66.0835 33.618,58.0005 41.681,58.0005 41.681,66.0835"/> + </g> +</svg> diff --git a/docs/static/icons/fishing-pole.svg b/docs/static/icons/fishing-pole.svg new file mode 100644 index 0000000000..d2e025e90f --- /dev/null +++ b/docs/static/icons/fishing-pole.svg @@ -0,0 +1,11 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <circle cx="53.9106" cy="41.8563" r="1.7664" fill="#000000" stroke="none"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M62.3565,56.721c0.766,0.2372,1.487,0.6866,2.0105,1.4781l2.4829-10.0557c0,0-1.4978-4.969-6.7234-5.113"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M46.8612,68.5371l-1.6868,0.8404c-0.7318,0.3646-1.579-0.3197-1.2981-1.065c1.1586-3.0731,5.3156-4.8418,5.3156-4.8418 c-6.0185-6.5137-5.6827-14.9594-5.6827-14.9594C43.165,36.036,51.0838,33,51.0838,33s10.0419,3.2568,9.6976,15.7322 c0,0,0.0474,6.7897-7.5845,14.7386c0,0,4.139,1.7874,5.1468,4.8905c0.2414,0.7433-0.5889,1.3958-1.3077,1.0377l-1.7297-0.8618 C52.6583,67.2177,49.5092,67.2177,46.8612,68.5371z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M40.1126,51.6063c-0.5328,0.0283-1.138,0.0835-1.8251,0.1733v-3.5718c0,0,0.8311-3.533,5.5082-4.3333"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M51.0838,33l0.1114-25.1456c0,0-3.7092-8.8284-16.5482-3.8128C22.767,8.6826,16.4299,31.88,13.4264,44.5449"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M15.1732,49.142l-4.2894,17.4836c-3.5506-0.0794-5.7337-1.4067-5.7337-1.4067l4.2894-17.4836 C9.4395,47.7352,12.054,49.142,15.1732,49.142z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M6.0532,61.5291c0,0,2.6145,1.4067,5.7337,1.4067"/> + </g> +</svg> diff --git a/docs/static/icons/gear.svg b/docs/static/icons/gear.svg new file mode 100644 index 0000000000..59687d84ff --- /dev/null +++ b/docs/static/icons/gear.svg @@ -0,0 +1,7 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <circle cx="36" cy="34.9064" r="5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <circle cx="36" cy="34.9064" r="10" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M31.1191,19.6921c-0.2389,0.9895-1.31,1.5799-2.2425,1.1717c-0.0147-0.0065-0.0296-0.0131-0.0445-0.0199l-7.1357-4.6903 l-0.73,0.6834l-3.6502,3.417l4.5037,7.484c0.7363,1.6239-1.0785,2.0744-1.0785,2.0744l-8.4766,2.1074l0.1649,4.9973l0.033,0.9995 l8.3622,1.7291h0c0.9521,0.3641,1.3501,1.4954,0.8359,2.3754l-0.0328,0.0562l-4.5037,7.484l3.6502,3.417l0.73,0.6834 l7.1357-4.6903c0.0149-0.0068,0.03-0.0129,0.0445-0.0199c0,0,0.0116-0.0042,0.0332-0.0112 c1.1606-0.3768,2.393,0.3463,2.6794,1.5324l1.7947,7.4336h1h5l1.8869-7.8157c0.2424-1.004,1.3364-1.5418,2.2794-1.1205h0 l7.1357,4.6903l0.73-0.6834l3.6502-3.417l-4.5037-7.484l-0.0328-0.0562c-0.5143-0.8801-0.1162-2.0113,0.8359-2.3755l0,0 l8.3622-1.7291l0.033-0.9995l0.1649-4.9973l-8.4766-2.1074c0,0-1.8149-0.4505-1.0785-2.0744l4.5037-7.484l-3.6502-3.417 l-0.73-0.6834l-7.1357,4.6903v0c-0.943,0.4212-2.037-0.1166-2.2794-1.1206L39,11.9064h-5h-1L31.1191,19.6921"/> + </g> +</svg> diff --git a/docs/static/icons/hammer-and-wrench.svg b/docs/static/icons/hammer-and-wrench.svg new file mode 100644 index 0000000000..89474c5119 --- /dev/null +++ b/docs/static/icons/hammer-and-wrench.svg @@ -0,0 +1,15 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <line x1="41.7188" x2="46.7811" y1="38.5092" y2="32.0332" fill="#000000" stroke="none"/> + <line x1="43.3629" x2="38.7032" y1="29.3197" y2="35.08" fill="#000000" stroke="none"/> + <polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="52,58.9064 40.9019,43.1756 37.8076,40.9408 27.2299,26.2257 24.2936,28.3506 34.8713,43.0658 36.0081,46.7171 47.4967,62.227"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M12.5106,19.7899l5.7909,8.029l10.323-7.4455l-3.3091-4.588c0,0,6.882-4.9637,10.8306-4.3242c0,0-6.5903-3.0933-13.3124,0.8832 S12.5106,19.7899,12.5106,19.7899z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M9.9316,22.7333l4.6653,6.5229l0,0c-0.4717,1.2669-1.6524,2.1256-2.9933,2.1771h0l-4.6653-6.5229l0,0 C7.1702,23.4779,8.5104,22.5031,9.9316,22.7333L9.9316,22.7333z"/> + <line x1="41.2893" x2="46.3516" y1="38.5092" y2="32.0332" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <line x1="42.9334" x2="38.2737" y1="29.3197" y2="35.08" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M46.3516,32.0332c3.2442,2.5754,8.6578,1.1565,12.0916-3.169s3.5876-9.9199,0.3434-12.4953l-5.1471,6.4838l-2.8327-0.0507 l-0.6772-2.7661l5.1323-6.4651c-3.2442-2.5754-8.6578-1.1565-12.0916,3.169c-3.4338,4.3256-3.5876,9.9199-0.3434,12.4953"/> + <path fill="none" stroke="#000000" stroke-miterlimit="10" d="M65.7251,28.3957"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M50,25.9064"/> + <polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="30.818,44.3856 19,58.9064 23,61.9064 32.9587,49.1665"/> + </g> +</svg> diff --git a/docs/static/icons/high-voltage.svg b/docs/static/icons/high-voltage.svg new file mode 100644 index 0000000000..348c96df96 --- /dev/null +++ b/docs/static/icons/high-voltage.svg @@ -0,0 +1,5 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M48.1628,4.4406L16.3224,37.7817c-0.6174,0.6465-0.1168,1.6589,0.8201,1.6589h19.0829l-18.304,28.8333l37.7269-36.4785 c0.659-0.6372,0.1665-1.6882-0.791-1.6882H36.3846L48.1628,4.4406z"/> + </g> +</svg> diff --git a/docs/static/icons/kafka.svg b/docs/static/icons/kafka.svg new file mode 100644 index 0000000000..7dca030abb --- /dev/null +++ b/docs/static/icons/kafka.svg @@ -0,0 +1 @@ +<svg width="154" height="250" viewBox="0 0 256 416" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path d="M201.816 230.216c-16.186 0-30.697 7.171-40.634 18.461l-25.463-18.026c2.703-7.442 4.255-15.433 4.255-23.797 0-8.219-1.498-16.076-4.112-23.408l25.406-17.835c9.936 11.233 24.409 18.365 40.548 18.365 29.875 0 54.184-24.305 54.184-54.184 0-29.879-24.309-54.184-54.184-54.184-29.875 0-54.184 24.305-54.184 54.184 0 5.348.808 10.505 2.258 15.389l-25.423 17.844c-10.62-13.175-25.911-22.374-43.333-25.182v-30.64c24.544-5.155 43.037-26.962 43.037-53.019C124.171 24.305 99.862 0 69.987 0 40.112 0 15.803 24.305 15.803 54.184c0 25.708 18.014 47.246 42.067 52.769v31.038C25.044 143.753 0 172.401 0 206.854c0 34.621 25.292 63.374 58.355 68.94v32.774c-24.299 5.341-42.552 27.011-42.552 52.894 0 29.879 24.309 54.184 54.184 54.184 29.875 0 54.184-24.305 54.184-54.184 0-25.883-18.253-47.553-42.552-52.894v-32.775a69.965 69.965 0 0 0 42.6-24.776l25.633 18.143c-1.423 4.84-2.22 9.946-2.22 15.24 0 29.879 24.309 54.184 54.184 54.184 29.875 0 54.184-24.305 54.184-54.184 0-29.879-24.309-54.184-54.184-54.184zm0-126.695c14.487 0 26.27 11.788 26.27 26.271s-11.783 26.27-26.27 26.27-26.27-11.787-26.27-26.27c0-14.483 11.783-26.271 26.27-26.271zm-158.1-49.337c0-14.483 11.784-26.27 26.271-26.27s26.27 11.787 26.27 26.27c0 14.483-11.783 26.27-26.27 26.27s-26.271-11.787-26.271-26.27zm52.541 307.278c0 14.483-11.783 26.27-26.27 26.27s-26.271-11.787-26.271-26.27c0-14.483 11.784-26.27 26.271-26.27s26.27 11.787 26.27 26.27zm-26.272-117.97c-20.205 0-36.642-16.434-36.642-36.638 0-20.205 16.437-36.642 36.642-36.642 20.204 0 36.641 16.437 36.641 36.642 0 20.204-16.437 36.638-36.641 36.638zm131.831 67.179c-14.487 0-26.27-11.788-26.27-26.271s11.783-26.27 26.27-26.27 26.27 11.787 26.27 26.27c0 14.483-11.783 26.271-26.27 26.271z"/></svg> diff --git a/docs/static/icons/label.svg b/docs/static/icons/label.svg new file mode 100644 index 0000000000..a0d1e10059 --- /dev/null +++ b/docs/static/icons/label.svg @@ -0,0 +1,5 @@ +<svg id="emoji" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M24.7,16.4l-17,6v27.9l17,6h40v-40h-40V16.4z M16.2,41.4c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S19,41.4,16.2,41.4z"/> + </g> +</svg> diff --git a/docs/static/icons/rocket.svg b/docs/static/icons/rocket.svg new file mode 100644 index 0000000000..87e5e65465 --- /dev/null +++ b/docs/static/icons/rocket.svg @@ -0,0 +1,10 @@ +<svg id="emoji" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path d="M48.405,29.49c-3.2761,0-5.941-2.6641-5.941-5.9392s2.6649-5.9392,5.941-5.9392c3.2761,0,5.941,2.6641,5.941,5.9392 S51.6811,29.49,48.405,29.49z M48.405,19.5913c-2.1839,0-3.9607,1.7757-3.9607,3.9595c0,2.1837,1.7768,3.9595,3.9607,3.9595 c2.1838,0,3.9607-1.7758,3.9607-3.9595C52.3657,21.367,50.5888,19.5913,48.405,19.5913z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.949" d="M20.653,45.063c-1.678,0.7083-3.2222,1.7475-4.5331,3.0508c-3.1581,3.1631-4.6517,7.5594-3.9703,11.687 c4.128,0.6762,8.5221-0.8196,11.683-3.9769c1.3043-1.3104,2.3446-2.8541,3.0537-4.5318"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.949" d="M14.923,35.749c-0.69,0.65-1.3472,1.3303-1.9691,2.0383c3.4682,0.9313,6.7846,2.521,9.7604,4.6784 c0.2264-0.414,0.5104-0.7939,0.8435-1.1281c0.6949-0.6935,1.5791-1.1665,2.5417-1.3598c0.2106-4.0507,1.3364-8.0899,3.293-11.814 c0.0019-0.0037,0.0037-0.0074,0.0056-0.0112c-2.645,0.5687-5.2188,1.4928-7.6405,2.7434 C19.2616,32.199,16.9577,33.8349,14.923,35.749L14.923,35.749z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.949" d="M31.973,45.839c-0.1919,0.966-0.6657,1.8536-1.3616,2.5507c-0.3389,0.3373-0.7246,0.6241-1.1452,0.8516 c2.1626,2.9716,3.7579,6.2847,4.6952,9.7506c0.7092-0.6216,1.3906-1.2786,2.0417-1.9685c1.9136-2.0343,3.5491-4.3376,4.8516-6.8326 c1.2507-2.4201,2.1751-4.9922,2.7442-7.6354c-3.7285,1.9544-7.7719,3.0771-11.826,3.2837L31.973,45.839z"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.949" d="M31.83,43.345c0.2696,0.8863,0.2506,1.6919,0.1371,2.5245c7.0759-0.3611,13.993-3.5031,19.243-8.7412 c6.7106-6.7215,9.8836-16.063,8.4351-24.834c-8.7712-1.4365-18.108,1.742-24.823,8.4508 c-5.2322,5.2509-8.3679,12.164-8.7242,19.234c0.9413-0.1907,1.8984-0.0942,2.7693,0.2387"/> + <path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.949" d="M37.072,34.196l-0.0002,0c-2.4156,1.2183-4.6724,2.7626-6.6996,4.5844c-2.0849,1.8911-3.9,4.0556-5.3844,6.4211 c-0.5039,0.8031-0.9684,1.6273-1.3917,2.4694"/> + </g> +</svg> diff --git a/docs/static/icons/speech-balloon.svg b/docs/static/icons/speech-balloon.svg new file mode 100644 index 0000000000..ce3b539031 --- /dev/null +++ b/docs/static/icons/speech-balloon.svg @@ -0,0 +1,10 @@ +<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"> + <g id="line"> + <path fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="m31.54 58.56c1.442 0.2858 2.93 0.4391 4.455 0.4391 12.68 0 23-10.32 23-23s-10.32-23-23-23-23 10.32-23 23c0 4.913 1.552 9.467 4.187 13.21"/> + <circle cx="26.79" cy="36" r="2"/> + <circle cx="36" cy="36" r="2"/> + <circle cx="45.21" cy="36" r="2"/> + <circle cx="-4.026" cy="64.73" r="2.5" transform="matrix(-.9831 .1829 .1829 .9831 0 0)" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/> + <circle cx="-13.58" cy="57.88" r="4.981" transform="matrix(-.9831 .1829 .1829 .9831 0 0)" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/> + </g> +</svg> From 0bce62b62d4056bdee0445718f0208e345e1cd7a Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Wed, 3 Mar 2021 17:53:09 +0100 Subject: [PATCH 11/43] [#1132] Fix missing , in nginx (#1133) closes #1132 --- frontend/ui/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/nginx.conf b/frontend/ui/nginx.conf index 2c1389b3cc..c6f960864f 100644 --- a/frontend/ui/nginx.conf +++ b/frontend/ui/nginx.conf @@ -48,7 +48,7 @@ http { local template = require("resty.template") local template_string = ngx.location.capture("/index.html") template.render(template_string.body, { - API_HOST = os.getenv("API_HOST") + API_HOST = os.getenv("API_HOST"), CHATPLUGIN_HOST = os.getenv("CHATPLUGIN_HOST") }) } From 56b46ee07eed44bd0ad2168126f00bd0b9920dbf Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Wed, 3 Mar 2021 17:58:39 +0100 Subject: [PATCH 12/43] [#1000] ConversationList scrolls over TopBar (#1129) closes #1000 --- frontend/ui/src/components/TopBar/index.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/src/components/TopBar/index.module.scss b/frontend/ui/src/components/TopBar/index.module.scss index caa0baa56a..a63d0bfda5 100644 --- a/frontend/ui/src/components/TopBar/index.module.scss +++ b/frontend/ui/src/components/TopBar/index.module.scss @@ -5,7 +5,7 @@ display: flex; flex-direction: row; justify-content: space-between; - z-index: 2; + z-index: 100; height: 72px; background-color: white; box-shadow: 0 3px 8px 0 var(--color-light-gray); From 000ba7dfa0db0abb5b8a1d782031bca8adf3a36f Mon Sep 17 00:00:00 2001 From: lucapette <ciao@lucapette.me> Date: Thu, 4 Mar 2021 09:01:23 +0100 Subject: [PATCH 13/43] [#1134] Add dependabot config (#1135) For now, we check the package.json of all the frontend. I purposed ignored docusaurus for now --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..d1f0d08514 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" From 95c2a26e4a5aa2104bf6fd49a8fd490a82905286 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 09:43:44 +0100 Subject: [PATCH 14/43] Bump react-redux from 7.1.3 to 7.2.2 (#1140) Bumps [react-redux](https://github.com/reduxjs/react-redux) from 7.1.3 to 7.2.2. - [Release notes](https://github.com/reduxjs/react-redux/releases) - [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md) - [Commits](https://github.com/reduxjs/react-redux/compare/v7.1.3...v7.2.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 58 ++++++++++++---------------------------------------- 2 files changed, 14 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index b1eba8c7ea..cfb259f661 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "react-dom": "16.12.0", "react-facebook-login": "^4.1.1", "react-markdown": "^5.0.3", - "react-redux": "7.1.3", + "react-redux": "7.2.2", "react-router-dom": "5.1.2", "react-window": "1.8.5", "react-window-infinite-loader": "1.0.5", diff --git a/yarn.lock b/yarn.lock index 3219743d5f..b964ee253d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1511,31 +1511,10 @@ "@babel/plugin-transform-react-jsx-source" "^7.12.1" "@babel/plugin-transform-react-pure-annotations" "^7.12.1" -"@babel/runtime@^7.0.0": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.1.2", "@babel/runtime@^7.4.0": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz" - integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.5.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.8.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.1.tgz" - integrity sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.8.4": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.9.tgz#97dbe2116e2630c489f22e0656decd60aaa1fcee" + integrity sha512-aY2kU+xgJ3dJ1eU6FMB9EH8dIe8dmusF1xEku52joLvw6eAFN0AI+WxCLDnpev2LEejWBAy2sBvBOBAjI3zmvA== dependencies: regenerator-runtime "^0.13.4" @@ -5193,7 +5172,7 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -7678,12 +7657,7 @@ react-hot-loader@^4.12.20: shallowequal "^1.1.0" source-map "^0.7.3" -react-is@^16.6.0, react-is@^16.7.0: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz" - integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== - -react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0: +react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -7719,17 +7693,16 @@ react-modal@^3.11.2: react-lifecycles-compat "^3.0.0" warning "^4.0.3" -react-redux@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.1.3.tgz" - integrity sha512-uI1wca+ECG9RoVkWQFF4jDMqmaw0/qnvaSvOoL/GA4dNxf6LoV8sUAcNDvE5NWKs4hFpn0t6wswNQnY3f7HT3w== +react-redux@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.2.tgz#03862e803a30b6b9ef8582dadcc810947f74b736" + integrity sha512-8+CQ1EvIVFkYL/vu6Olo7JFLWop1qRUeb46sGtIMDCSpgwPQq8fPLpirIB0iTqFe9XYEFPHssdX8/UwN6pAkEA== dependencies: - "@babel/runtime" "^7.5.5" - hoist-non-react-statics "^3.3.0" - invariant "^2.2.4" + "@babel/runtime" "^7.12.1" + hoist-non-react-statics "^3.3.2" loose-envify "^1.4.0" prop-types "^15.7.2" - react-is "^16.9.0" + react-is "^16.13.1" react-router-dom@5.1.2: version "5.1.2" @@ -7902,11 +7875,6 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== - regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.5: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz" From 0ae0f28c68601f5f4e8df3bf57e9b257955680d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 09:58:28 +0100 Subject: [PATCH 15/43] Bump preact from 10.5.7 to 10.5.12 (#1139) Bumps [preact](https://github.com/preactjs/preact) from 10.5.7 to 10.5.12. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.7...10.5.12) Signed-off-by: dependabot[bot] <support@github.com> 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 cfb259f661..373b831e3c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "core-js": "3", "linkifyjs": "^2.1.9", "lodash-es": "^4.17.15", - "preact": "^10.5.7", + "preact": "^10.5.12", "react": "16.12.0", "react-dom": "16.12.0", "react-facebook-login": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index b964ee253d..09d39e1986 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7393,10 +7393,10 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0. source-map "^0.6.1" supports-color "^6.1.0" -preact@^10.5.7: - version "10.5.7" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.7.tgz" - integrity sha512-4oEpz75t/0UNcwmcsjk+BIcDdk68oao+7kxcpc1hQPNs2Oo3ZL9xFz8UBf350mxk/VEdD41L5b4l2dE3Ug3RYg== +preact@^10.5.12: + version "10.5.12" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.12.tgz#6a8ee8bf40a695c505df9abebacd924e4dd37704" + integrity sha512-r6siDkuD36oszwlCkcqDJCAKBQxGoeEGytw2DGMD5A/GGdu5Tymw+N2OBXwvOLxg6d1FeY8MgMV3cc5aVQo4Cg== prelude-ls@^1.2.1: version "1.2.1" From 6c251dd3ff640f00f617e62dd5d8b38c08b16ab5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 09:59:11 +0100 Subject: [PATCH 16/43] Bump @types/lodash-es from 4.17.3 to 4.17.4 (#1137) Bumps [@types/lodash-es](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash-es) from 4.17.3 to 4.17.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash-es) Signed-off-by: dependabot[bot] <support@github.com> 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 373b831e3c..8f3d1c4304 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@bazel/ibazel": "^0.14.0", "@bazel/typescript": "^3.2.0", "@svgr/webpack": "^5.4.0", - "@types/lodash-es": "^4.17.3", + "@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.11.0", diff --git a/yarn.lock b/yarn.lock index 09d39e1986..9b71feed52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1893,10 +1893,10 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== -"@types/lodash-es@^4.17.3": - version "4.17.3" - resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.3.tgz" - integrity sha512-iHI0i7ZAL1qepz1Y7f3EKg/zUMDwDfTzitx+AlHhJJvXwenP682ZyGbgPSc5Ej3eEAKVbNWKFuwOadCj5vBbYQ== +"@types/lodash-es@^4.17.4": + version "4.17.4" + resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.4.tgz#b2e440d2bf8a93584a9fd798452ec497986c9b97" + integrity sha512-BBz79DCJbD2CVYZH67MBeHZRX++HF+5p8Mo5MzjZi64Wac39S3diedJYHZtScbRVf4DjZyN6LzA0SB0zy+HSSQ== dependencies: "@types/lodash" "*" From 2dad9cbd98f8208ee73266d0e2788339e1159acd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 09:59:29 +0100 Subject: [PATCH 17/43] Bump @types/react-redux from 7.1.3 to 7.1.16 (#1136) Bumps [@types/react-redux](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-redux) from 7.1.3 to 7.1.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-redux) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 8f3d1c4304..db5ad04937 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@types/node": "12.11.1", "@types/react": "16.9.34", "@types/react-dom": "16.9.2", - "@types/react-redux": "7.1.3", + "@types/react-redux": "7.1.16", "@types/react-router-dom": "^5.1.0", "camelcase-keys": "^6.2.2", "core-js": "3", diff --git a/yarn.lock b/yarn.lock index 9b71feed52..9706026631 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1959,10 +1959,10 @@ dependencies: "@types/react" "*" -"@types/react-redux@7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.3.tgz" - integrity sha512-coaQFfn6XrHF/4CSF8eBM9rUbi5TX6qVhS+KF89Z2nC9YdTKTckOpJLJyQocYLrXF0IFX+/ZUJwMvbZ0nNmkDg== +"@types/react-redux@7.1.16": + version "7.1.16" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.16.tgz#0fbd04c2500c12105494c83d4a3e45c084e3cb21" + integrity sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw== dependencies: "@types/hoist-non-react-statics" "^3.3.0" "@types/react" "*" @@ -2001,15 +2001,7 @@ dependencies: "@types/react" "*" -"@types/react@*": - version "16.9.19" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.19.tgz" - integrity sha512-LJV97//H+zqKWMms0kvxaKYJDG05U2TtQB3chRLF8MPNs+MQh/H1aGlyDUxjaHvu08EAGerdX2z4LTBc7ns77A== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -"@types/react@16.9.34": +"@types/react@*", "@types/react@16.9.34": version "16.9.34" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.34.tgz" integrity sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow== From aa130b197be708b790a92f0fb34a33bad89adc85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 09:59:53 +0100 Subject: [PATCH 18/43] Bump react-hot-loader from 4.12.20 to 4.13.0 (#1138) Bumps [react-hot-loader](https://github.com/gaearon/react-hot-loader) from 4.12.20 to 4.13.0. - [Release notes](https://github.com/gaearon/react-hot-loader/releases) - [Changelog](https://github.com/gaearon/react-hot-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/gaearon/react-hot-loader/compare/v4.12.20...v4.13.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index db5ad04937..0c743523d7 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "minimist": "^1.2.5", "node-sass": "^4.14.0", "prettier": "^1.19.1", - "react-hot-loader": "^4.12.20", + "react-hot-loader": "^4.13.0", "reselect": "4.0.0", "sass-loader": "^8.0.2", "style-loader": "^1.1.4", diff --git a/yarn.lock b/yarn.lock index 9706026631..ea567deffc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6056,7 +6056,7 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@1.2.3, loader-utils@^1.0.2: +loader-utils@1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz" integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== @@ -6065,7 +6065,7 @@ loader-utils@1.2.3, loader-utils@^1.0.2: emojis-list "^2.0.0" json5 "^1.0.1" -loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -7635,10 +7635,10 @@ react-facebook-login@^4.1.1: resolved "https://registry.yarnpkg.com/react-facebook-login/-/react-facebook-login-4.1.1.tgz" integrity sha512-COnHEHlYGTKipz4963safFAK9PaNTcCiXfPXMS/yxo8El+/AJL5ye8kMJf23lKSSGGPgqFQuInskIHVqGqTvSw== -react-hot-loader@^4.12.20: - version "4.12.20" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.20.tgz" - integrity sha512-lPlv1HVizi0lsi+UFACBJaydtRYILWkfHAC/lyCs6ZlAxlOZRQIfYHDqiGaRvL/GF7zyti+Qn9XpnDAUvdFA4A== +react-hot-loader@^4.13.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.13.0.tgz#c27e9408581c2a678f5316e69c061b226dc6a202" + integrity sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" From a7e35248a86e81560c148b4d696701940ec7b6a4 Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Thu, 4 Mar 2021 10:16:01 +0100 Subject: [PATCH 19/43] =?UTF-8?q?[#1034]=20Tag=20empty=20state=20has=20str?= =?UTF-8?q?ange=20scrolling=E2=80=A6=20(#1141)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …issues closes #1034 --- .../src/pages/Tags/EmptyStateTags.module.scss | 43 ++++++++++++++++++ frontend/ui/src/pages/Tags/EmptyStateTags.tsx | 32 +++++--------- frontend/ui/src/pages/Tags/index.module.scss | 44 +++++-------------- 3 files changed, 65 insertions(+), 54 deletions(-) create mode 100644 frontend/ui/src/pages/Tags/EmptyStateTags.module.scss diff --git a/frontend/ui/src/pages/Tags/EmptyStateTags.module.scss b/frontend/ui/src/pages/Tags/EmptyStateTags.module.scss new file mode 100644 index 0000000000..258fb5c0b6 --- /dev/null +++ b/frontend/ui/src/pages/Tags/EmptyStateTags.module.scss @@ -0,0 +1,43 @@ +@import '../../assets/scss/fonts.scss'; +@import '../../assets/scss/colors.scss'; + +.cardRaised { + width: 100%; + height: 100%; + background: #fff; + display: flex; + flex-direction: column; + align-content: center; + padding: 1.5em; + border-radius: 8px 0px 8px 0px; + color: var(--color-text-contrast); +} + +.emptyStateTitle { + display: flex; + flex-direction: column; + align-items: flex-start; + margin: auto; + width: 360px; + + h1 { + color: var(--color-airy-blue); + @include font-m; + } + + p { + color: var(--color-text-gray); + @include font-base; + padding-top: 8px; + padding-bottom: 32px; + } + + img { + margin-bottom: 40px; + } +} + +.tagForm { + width: 370px; + margin: auto; +} diff --git a/frontend/ui/src/pages/Tags/EmptyStateTags.tsx b/frontend/ui/src/pages/Tags/EmptyStateTags.tsx index 7e07a327cb..680fa5f418 100644 --- a/frontend/ui/src/pages/Tags/EmptyStateTags.tsx +++ b/frontend/ui/src/pages/Tags/EmptyStateTags.tsx @@ -1,33 +1,23 @@ import React, {useState} from 'react'; - -import styles from './index.module.scss'; import {Button} from '@airyhq/components'; import {ReactComponent as EmptyImage} from 'assets/images/empty-state/tags-empty-state.svg'; + import SimpleTagForm from './SimpleTagForm'; +import styles from './EmptyStateTags.module.scss'; const EmptyStateTags: React.FC = (): JSX.Element => { const [show, setShow] = useState(false); return ( - <> - {!show && ( - <div className={styles.cardRaised}> - <div className={styles.emptyStateTitle}> - <h1>You don't have tags yet.</h1> - <p> - Tags provide a useful way to group related conversations together and to quickly filter and search them. - </p> - <EmptyImage /> - <Button onClick={() => setShow(true)}>Create a Tag</Button> - </div> - </div> - )} - {show && ( - <div className={styles.emptyStateTitle}> - <SimpleTagForm onClose={() => setShow(false)} /> - </div> - )} - </> + <div className={styles.cardRaised}> + <div className={styles.emptyStateTitle}> + <h1>You don't have tags yet.</h1> + <p>Tags provide a useful way to group related conversations together and to quickly filter and search them.</p> + <EmptyImage /> + <Button onClick={() => setShow(true)}>Create a Tag</Button> + {show && <SimpleTagForm onClose={() => setShow(false)} />} + </div> + </div> ); }; diff --git a/frontend/ui/src/pages/Tags/index.module.scss b/frontend/ui/src/pages/Tags/index.module.scss index 9fbbb61071..21eae3f88d 100644 --- a/frontend/ui/src/pages/Tags/index.module.scss +++ b/frontend/ui/src/pages/Tags/index.module.scss @@ -2,16 +2,12 @@ @import '../../assets/scss/colors.scss'; .tagsWrapper { - .cardRaised { - width: 100%; - background: #fff; - } - display: block; padding-left: 96px; padding-top: 88px; width: 100%; overflow-y: auto; + min-height: calc(100vh - 170px); } .organizationSectionHeadline { @@ -36,13 +32,20 @@ } .cardRaised { + width: 100%; + height: 100%; + background: #fff; + display: flex; + flex-direction: column; + align-content: center; padding: 1.5em; border-radius: 8px 0px 8px 0px; - width: 94%; color: var(--color-text-contrast); + h2 { @include font-m; } + &.accountStatus { padding-bottom: 5px; & > div { @@ -52,12 +55,14 @@ color: var(--color-airy-blue); } } + &.airySupport { padding-bottom: 0.5em; a { color: #212529; @include font-base; } + .faqLink { padding-top: 12px; margin-top: 10px; @@ -148,33 +153,6 @@ padding-left: 2px; } -.emptyStateTitle { - position: relative; - left: 40%; - padding-top: 170px; - padding-bottom: 100%; - display: flex; - flex-direction: column; - align-items: flex-start; - - h1 { - color: var(--color-airy-blue); - @include font-m; - } - - p { - color: var(--color-text-gray); - @include font-base; - padding-top: 8px; - padding-bottom: 32px; - width: 25%; - } - - img { - margin-bottom: 40px; - } -} - .noResultHeadline { @include font-m; font-weight: bold; From 64e9b4e1e3b205a25cd38e1b28091ddf76a74b18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:34:28 +0100 Subject: [PATCH 20/43] Bump @bazel/typescript from 3.2.0 to 3.2.1 (#1146) Bumps [@bazel/typescript](https://github.com/bazelbuild/rules_nodejs/tree/HEAD/packages/typescript) from 3.2.0 to 3.2.1. - [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.2.1/packages/typescript) Signed-off-by: dependabot[bot] <support@github.com> 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 0c743523d7..aee42c1b22 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@babel/preset-env": "^7.8.4", "@bazel/bazelisk": "^1.7.5", "@bazel/ibazel": "^0.14.0", - "@bazel/typescript": "^3.2.0", + "@bazel/typescript": "^3.2.1", "@svgr/webpack": "^5.4.0", "@types/lodash-es": "^4.17.4", "@types/react-window-infinite-loader": "^1.0.3", diff --git a/yarn.lock b/yarn.lock index ea567deffc..4aba19ae30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1594,10 +1594,10 @@ resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.14.0.tgz#86fa0002bed2ce1123b7ad98d4dd4623a0d93244" integrity sha512-s0gyec6lArcRDwVfIP6xpY8iEaFpzrSpyErSppd3r2O49pOEg7n6HGS/qJ8ncvme56vrDk6crl/kQ6VAdEO+rg== -"@bazel/typescript@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.2.0.tgz#299bd173fe04f98407ab9be4f654662c1c28470e" - integrity sha512-RKdy9ThbcUAqZR3AJK7AR/nxbJqdHi7pPayIGUSMIpxVkeTxVRQpf1aGe2H02HdZ9fR/uk1xXhO/Ff9TLvTgHQ== +"@bazel/typescript@^3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.2.1.tgz#564849e2f05387612d13ef64304b7a7582bd107a" + integrity sha512-2KgMqKcbqL89WWWVC2iwTCS0tMWmQ4LpQgFhaF3Lp56Edl0nv/fy0TOu+waw2Qs2rTBbTVKhk5/9DRiqJmOd2g== dependencies: protobufjs "6.8.8" semver "5.6.0" From cdce4c2807ed30d975f0253acb238b95191d9066 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:34:49 +0100 Subject: [PATCH 21/43] Bump file-loader from 6.0.0 to 6.2.0 (#1145) Bumps [file-loader](https://github.com/webpack-contrib/file-loader) from 6.0.0 to 6.2.0. - [Release notes](https://github.com/webpack-contrib/file-loader/releases) - [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/file-loader/compare/v6.0.0...v6.2.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index aee42c1b22..76a8547028 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint": "^7.16.0", "eslint-plugin-react": "^7.21.5", "express": "^4.17.1", - "file-loader": "^6.0.0", + "file-loader": "^6.2.0", "html-webpack-plugin": "^4.2.0", "minimist": "^1.2.5", "node-sass": "^4.14.0", diff --git a/yarn.lock b/yarn.lock index 4aba19ae30..a4c7e5a4a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4575,13 +4575,13 @@ file-entry-cache@^6.0.0: dependencies: flat-cache "^3.0.4" -file-loader@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.0.0.tgz" - integrity sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ== +file-loader@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" + integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== dependencies: loader-utils "^2.0.0" - schema-utils "^2.6.5" + schema-utils "^3.0.0" file-uri-to-path@1.0.0: version "1.0.0" From efb6ccfe28a2fdef645461d84057c47a11d7b7df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:57:34 +0100 Subject: [PATCH 22/43] Bump eslint from 7.16.0 to 7.21.0 (#1144) Bumps [eslint](https://github.com/eslint/eslint) from 7.16.0 to 7.21.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.16.0...v7.21.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 122 ++++++++++++--------------------------------------- 2 files changed, 30 insertions(+), 94 deletions(-) diff --git a/package.json b/package.json index 76a8547028..f9fcef7614 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "css-loader": "^3.5.2", "cypress": "^6.5.0", "ejs-compiled-loader": "^1.1.0", - "eslint": "^7.16.0", + "eslint": "^7.21.0", "eslint-plugin-react": "^7.21.5", "express": "^4.17.1", "file-loader": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index a4c7e5a4a0..cb8fd3c5d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13,20 +13,13 @@ react-modal "^3.11.2" react-router-dom "5.1.2" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== +"@babel/code-frame@7.12.11", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" - "@babel/compat-data@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.1.tgz" @@ -513,15 +506,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/highlight@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz" - integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - "@babel/parser@^7.10.4", "@babel/parser@^7.12.1", "@babel/parser@^7.12.3": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz" @@ -1655,10 +1639,10 @@ debug "^3.1.0" lodash.once "^4.1.1" -"@eslint/eslintrc@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz" - integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ== +"@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== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1667,7 +1651,6 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -2353,17 +2336,7 @@ ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.0: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz" - integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.5.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2373,16 +2346,6 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.5.5: - version "6.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz" - integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz" @@ -3725,7 +3688,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4.3.2: +debug@4.3.2, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -3739,20 +3702,6 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.0.0, debug@^4.0.1, debug@^4.1.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -debug@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz" @@ -4236,13 +4185,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.16.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.16.0.tgz" - integrity sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw== +eslint@^7.21.0: + version "7.21.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" + integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== dependencies: - "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.2" + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -4253,9 +4202,9 @@ eslint@^7.16.0: eslint-utils "^2.1.0" eslint-visitor-keys "^2.0.0" espree "^7.3.1" - esquery "^1.2.0" + esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^6.0.0" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" globals "^12.1.0" @@ -4266,7 +4215,7 @@ eslint@^7.16.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -4293,10 +4242,10 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz" - integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -4568,10 +4517,10 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz" - integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" @@ -5333,7 +5282,7 @@ immer@^2.1.5: resolved "https://registry.yarnpkg.com/immer/-/immer-2.1.5.tgz" integrity sha512-xyjQyTBYIeiz6jd02Hg12jV+9QISwF1crLcwTlzHpWH4e0ryNWj1kacpTwimK3bJV5NKKXw458G2vpqoB/inFA== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -5341,14 +5290,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - import-local@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz" @@ -6113,12 +6054,7 @@ lodash.once@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@^4.0.0, lodash@^4.17.13, lodash@^4.17.15, lodash@~4.17.12: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - -lodash@^4.17.19, lodash@^4.17.20: +lodash@^4.0.0, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.12: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== From a1779ceda1217c24c1d5e4dfc110c0284a631984 Mon Sep 17 00:00:00 2001 From: Kazeem Adetunji <kazeem@airy.co> Date: Thu, 4 Mar 2021 13:59:08 +0100 Subject: [PATCH 23/43] [#1142] Backbutton & search aligned (#1149) --- .../Inbox/ConversationListHeader/index.module.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss index 1076e9cb78..e81dd14cfa 100644 --- a/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss +++ b/frontend/ui/src/pages/Inbox/ConversationListHeader/index.module.scss @@ -19,7 +19,7 @@ flex-direction: row; align-items: stretch; justify-content: flex-start; - height: 100px; + height: 42px; width: 100%; animation-name: searchFieldAnimation; animation-duration: 500ms; @@ -74,7 +74,13 @@ } .searchIcon { - margin-top: 7px; + width: 22px; + height: 22px; + padding-top: 2px; + margin-right: 4px; + position: relative; + top: 8px; + path { fill: var(--color-text-gray); } From f1bd26793aa17bcd5f08fe8cd87945ded3678181 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 14:11:41 +0100 Subject: [PATCH 24/43] Bump eslint-plugin-react from 7.21.5 to 7.22.0 (#1148) Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.5 to 7.22.0. - [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases) - [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.5...v7.22.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index f9fcef7614..40631262ae 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "cypress": "^6.5.0", "ejs-compiled-loader": "^1.1.0", "eslint": "^7.21.0", - "eslint-plugin-react": "^7.21.5", + "eslint-plugin-react": "^7.22.0", "express": "^4.17.1", "file-loader": "^6.2.0", "html-webpack-plugin": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index cb8fd3c5d2..c6ae86e225 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4135,10 +4135,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-plugin-react@^7.21.5: - version "7.21.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz" - integrity sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g== +eslint-plugin-react@^7.22.0: + version "7.22.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz#3d1c542d1d3169c45421c1215d9470e341707269" + integrity sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA== dependencies: array-includes "^3.1.1" array.prototype.flatmap "^1.2.3" @@ -6846,17 +6846,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - has "^1.0.3" - -object.values@^1.1.1: +object.values@^1.1.0, object.values@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz" integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== @@ -8050,14 +8040,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.3.2: - version "1.15.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz" - integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== - dependencies: - path-parse "^1.0.6" - -resolve@^1.18.1: +resolve@^1.10.0, resolve@^1.18.1, resolve@^1.3.2: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== From 5fae856935b87fd3cc67cc5f7c66af452b1eefa6 Mon Sep 17 00:00:00 2001 From: Ljupco Vangelski <ljupcovangelski@users.noreply.github.com> Date: Thu, 4 Mar 2021 17:11:14 +0100 Subject: [PATCH 25/43] [#1152] Fix conditional config apply (#1153) --- infrastructure/scripts/provision/core.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/scripts/provision/core.sh b/infrastructure/scripts/provision/core.sh index a3285de9b7..285b86c248 100755 --- a/infrastructure/scripts/provision/core.sh +++ b/infrastructure/scripts/provision/core.sh @@ -19,4 +19,7 @@ chmod +x airy mv airy /usr/local/bin/ airy init airy create --kubeconfig /etc/rancher/k3s/k3s.yaml -airy config apply --kube-config /etc/rancher/k3s/k3s.yaml --config "${INFRASTRUCTURE_PATH}"/airy.yaml + +if [[ -f "${INFRASTRUCTURE_PATH}"/airy.yaml ]]; then + airy config apply --kube-config /etc/rancher/k3s/k3s.yaml --config "${INFRASTRUCTURE_PATH}"/airy.yaml +fi From 7bdb190cca8e0273051d9c25fc657feac515ecba Mon Sep 17 00:00:00 2001 From: Christoph Proeschel <proeschel.christoph@gmail.com> Date: Thu, 4 Mar 2021 17:39:18 +0100 Subject: [PATCH 26/43] [#1041] Restructure cli to prepare for providers (#1151) --- docs/cli-doc/BUILD | 2 +- docs/cli-doc/generate_cli_docs.go | 2 +- docs/docs/cli/reference.md | 2 +- infrastructure/cli/BUILD | 2 +- infrastructure/cli/main.go | 2 +- infrastructure/cli/{ => pkg}/cmd/BUILD | 12 +++--- infrastructure/cli/{ => pkg}/cmd/api/BUILD | 2 +- infrastructure/cli/{ => pkg}/cmd/api/api.go | 0 infrastructure/cli/{ => pkg}/cmd/api/login.go | 0 .../cli/{ => pkg}/cmd/api/signup.go | 0 infrastructure/cli/{ => pkg}/cmd/config/BUILD | 2 +- .../cli/{ => pkg}/cmd/config/config.go | 0 .../cli/{ => pkg}/cmd/config/configmaps.go | 0 .../cli/{ => pkg}/cmd/config/parser.go | 0 infrastructure/cli/{ => pkg}/cmd/create/BUILD | 6 +-- .../cli/{ => pkg}/cmd/create/create.go | 27 ++++-------- .../cli/{ => pkg}/cmd/create/helm.go | 18 +------- infrastructure/cli/{ => pkg}/cmd/root.go | 10 ++--- infrastructure/cli/{ => pkg}/cmd/status/BUILD | 2 +- .../cli/{ => pkg}/cmd/status/status.go | 0 infrastructure/cli/{ => pkg}/cmd/ui/BUILD | 2 +- infrastructure/cli/{ => pkg}/cmd/ui/ui.go | 0 infrastructure/cli/pkg/providers/BUILD | 14 +++++++ infrastructure/cli/pkg/providers/aws/BUILD | 9 ++++ infrastructure/cli/pkg/providers/aws/aws.go | 14 +++++++ .../cli/pkg/providers/minikube/BUILD | 9 ++++ .../cli/pkg/providers/minikube/minikube.go | 14 +++++++ infrastructure/cli/pkg/providers/providers.go | 41 +++++++++++++++++++ infrastructure/scripts/provision/core.sh | 2 +- 29 files changed, 135 insertions(+), 59 deletions(-) rename infrastructure/cli/{ => pkg}/cmd/BUILD (66%) rename infrastructure/cli/{ => pkg}/cmd/api/BUILD (93%) rename infrastructure/cli/{ => pkg}/cmd/api/api.go (100%) rename infrastructure/cli/{ => pkg}/cmd/api/login.go (100%) rename infrastructure/cli/{ => pkg}/cmd/api/signup.go (100%) rename infrastructure/cli/{ => pkg}/cmd/config/BUILD (94%) rename infrastructure/cli/{ => pkg}/cmd/config/config.go (100%) rename infrastructure/cli/{ => pkg}/cmd/config/configmaps.go (100%) rename infrastructure/cli/{ => pkg}/cmd/config/parser.go (100%) rename infrastructure/cli/{ => pkg}/cmd/create/BUILD (81%) rename infrastructure/cli/{ => pkg}/cmd/create/create.go (51%) rename infrastructure/cli/{ => pkg}/cmd/create/helm.go (90%) rename infrastructure/cli/{ => pkg}/cmd/root.go (96%) rename infrastructure/cli/{ => pkg}/cmd/status/BUILD (91%) rename infrastructure/cli/{ => pkg}/cmd/status/status.go (100%) rename infrastructure/cli/{ => pkg}/cmd/ui/BUILD (89%) rename infrastructure/cli/{ => pkg}/cmd/ui/ui.go (100%) create mode 100644 infrastructure/cli/pkg/providers/BUILD create mode 100644 infrastructure/cli/pkg/providers/aws/BUILD create mode 100644 infrastructure/cli/pkg/providers/aws/aws.go create mode 100644 infrastructure/cli/pkg/providers/minikube/BUILD create mode 100644 infrastructure/cli/pkg/providers/minikube/minikube.go create mode 100644 infrastructure/cli/pkg/providers/providers.go diff --git a/docs/cli-doc/BUILD b/docs/cli-doc/BUILD index 271bb996b1..db92bc52a8 100644 --- a/docs/cli-doc/BUILD +++ b/docs/cli-doc/BUILD @@ -15,7 +15,7 @@ go_library( "ProjectDir": "{PROJECT_DIR}", }, deps = [ - "//infrastructure/cli/cmd", + "//infrastructure/cli/pkg/cmd", "@com_github_spf13_cobra//:cobra", ], ) diff --git a/docs/cli-doc/generate_cli_docs.go b/docs/cli-doc/generate_cli_docs.go index 4026bdb587..fb063d80e6 100644 --- a/docs/cli-doc/generate_cli_docs.go +++ b/docs/cli-doc/generate_cli_docs.go @@ -2,7 +2,7 @@ package main import ( "bufio" - "cli/cmd" + "cli/pkg/cmd" "os" "path/filepath" "sort" diff --git a/docs/docs/cli/reference.md b/docs/docs/cli/reference.md index 40b3700832..0d33b26063 100644 --- a/docs/docs/cli/reference.md +++ b/docs/docs/cli/reference.md @@ -95,7 +95,7 @@ airy create [flags] ``` -h, --help help for create - --provider string One of the supported providers (aws|local). Default is aws + --provider string One of the supported providers (aws|local|minikube). Default is aws (default "local") ``` #### Options inherited from parent commands diff --git a/infrastructure/cli/BUILD b/infrastructure/cli/BUILD index 5ebbe8aaad..b151dce0d8 100644 --- a/infrastructure/cli/BUILD +++ b/infrastructure/cli/BUILD @@ -8,7 +8,7 @@ go_library( srcs = ["main.go"], importpath = "cli", visibility = ["//visibility:private"], - deps = ["//infrastructure/cli/cmd"], + deps = ["//infrastructure/cli/pkg/cmd"], ) go_binary( diff --git a/infrastructure/cli/main.go b/infrastructure/cli/main.go index 6b3302a5ac..7e8091efd1 100644 --- a/infrastructure/cli/main.go +++ b/infrastructure/cli/main.go @@ -1,7 +1,7 @@ package main import ( - "cli/cmd" + "cli/pkg/cmd" ) func main() { diff --git a/infrastructure/cli/cmd/BUILD b/infrastructure/cli/pkg/cmd/BUILD similarity index 66% rename from infrastructure/cli/cmd/BUILD rename to infrastructure/cli/pkg/cmd/BUILD index e1f9eaef94..2e24ec379c 100644 --- a/infrastructure/cli/cmd/BUILD +++ b/infrastructure/cli/pkg/cmd/BUILD @@ -4,18 +4,18 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "cmd", srcs = ["root.go"], - importpath = "cli/cmd", + importpath = "cli/pkg/cmd", visibility = ["//visibility:public"], x_defs = { "Version": "{STABLE_VERSION}", "CommitSHA1": "{STABLE_GIT_COMMIT}", }, deps = [ - "//infrastructure/cli/cmd/api", - "//infrastructure/cli/cmd/config", - "//infrastructure/cli/cmd/create", - "//infrastructure/cli/cmd/status", - "//infrastructure/cli/cmd/ui", + "//infrastructure/cli/pkg/cmd/api", + "//infrastructure/cli/pkg/cmd/config", + "//infrastructure/cli/pkg/cmd/create", + "//infrastructure/cli/pkg/cmd/status", + "//infrastructure/cli/pkg/cmd/ui", "@com_github_mitchellh_go_homedir//:go-homedir", "@com_github_spf13_cobra//:cobra", "@com_github_spf13_viper//:viper", diff --git a/infrastructure/cli/cmd/api/BUILD b/infrastructure/cli/pkg/cmd/api/BUILD similarity index 93% rename from infrastructure/cli/cmd/api/BUILD rename to infrastructure/cli/pkg/cmd/api/BUILD index 5b43539d44..0b58232e7f 100644 --- a/infrastructure/cli/cmd/api/BUILD +++ b/infrastructure/cli/pkg/cmd/api/BUILD @@ -8,7 +8,7 @@ go_library( "login.go", "signup.go", ], - importpath = "cli/cmd/api", + importpath = "cli/pkg/cmd/api", visibility = ["//visibility:public"], deps = [ "//lib/go/httpclient", diff --git a/infrastructure/cli/cmd/api/api.go b/infrastructure/cli/pkg/cmd/api/api.go similarity index 100% rename from infrastructure/cli/cmd/api/api.go rename to infrastructure/cli/pkg/cmd/api/api.go diff --git a/infrastructure/cli/cmd/api/login.go b/infrastructure/cli/pkg/cmd/api/login.go similarity index 100% rename from infrastructure/cli/cmd/api/login.go rename to infrastructure/cli/pkg/cmd/api/login.go diff --git a/infrastructure/cli/cmd/api/signup.go b/infrastructure/cli/pkg/cmd/api/signup.go similarity index 100% rename from infrastructure/cli/cmd/api/signup.go rename to infrastructure/cli/pkg/cmd/api/signup.go diff --git a/infrastructure/cli/cmd/config/BUILD b/infrastructure/cli/pkg/cmd/config/BUILD similarity index 94% rename from infrastructure/cli/cmd/config/BUILD rename to infrastructure/cli/pkg/cmd/config/BUILD index aef79f85b3..4e1c5c8887 100644 --- a/infrastructure/cli/cmd/config/BUILD +++ b/infrastructure/cli/pkg/cmd/config/BUILD @@ -8,7 +8,7 @@ go_library( "configmaps.go", "parser.go", ], - importpath = "cli/cmd/config", + importpath = "cli/pkg/cmd/config", visibility = ["//visibility:public"], deps = [ "@com_github_mitchellh_go_homedir//:go-homedir", diff --git a/infrastructure/cli/cmd/config/config.go b/infrastructure/cli/pkg/cmd/config/config.go similarity index 100% rename from infrastructure/cli/cmd/config/config.go rename to infrastructure/cli/pkg/cmd/config/config.go diff --git a/infrastructure/cli/cmd/config/configmaps.go b/infrastructure/cli/pkg/cmd/config/configmaps.go similarity index 100% rename from infrastructure/cli/cmd/config/configmaps.go rename to infrastructure/cli/pkg/cmd/config/configmaps.go diff --git a/infrastructure/cli/cmd/config/parser.go b/infrastructure/cli/pkg/cmd/config/parser.go similarity index 100% rename from infrastructure/cli/cmd/config/parser.go rename to infrastructure/cli/pkg/cmd/config/parser.go diff --git a/infrastructure/cli/cmd/create/BUILD b/infrastructure/cli/pkg/cmd/create/BUILD similarity index 81% rename from infrastructure/cli/cmd/create/BUILD rename to infrastructure/cli/pkg/cmd/create/BUILD index d456a22644..383a27d95b 100644 --- a/infrastructure/cli/cmd/create/BUILD +++ b/infrastructure/cli/pkg/cmd/create/BUILD @@ -16,19 +16,17 @@ go_library( "helm.go", ":data", # keep ], - importpath = "cli/cmd/create", + importpath = "cli/pkg/cmd/create", visibility = ["//visibility:public"], deps = [ + "//infrastructure/cli/pkg/providers", "@com_github_spf13_cobra//:cobra", - "@com_github_spf13_viper//:viper", "@io_k8s_api//batch/v1:go_default_library", "@io_k8s_api//core/v1:go_default_library", "@io_k8s_api//rbac/v1:go_default_library", "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library", "@io_k8s_apimachinery//pkg/watch:go_default_library", "@io_k8s_client_go//kubernetes:go_default_library", - "@io_k8s_client_go//tools/clientcmd:go_default_library", - "@io_k8s_client_go//util/homedir:go_default_library", ], ) diff --git a/infrastructure/cli/cmd/create/create.go b/infrastructure/cli/pkg/cmd/create/create.go similarity index 51% rename from infrastructure/cli/cmd/create/create.go rename to infrastructure/cli/pkg/cmd/create/create.go index fc1b2f1af4..35f03a9860 100644 --- a/infrastructure/cli/cmd/create/create.go +++ b/infrastructure/cli/pkg/cmd/create/create.go @@ -1,17 +1,14 @@ package create import ( + "cli/pkg/providers" "fmt" "github.com/spf13/cobra" - "github.com/spf13/viper" - "k8s.io/client-go/util/homedir" "os" - "path/filepath" ) var ( provider string - kubeConfig string version string CreateCmd = &cobra.Command{ Use: "create", @@ -21,29 +18,22 @@ var ( } ) -const defaultKubeConfig = "$HOME/.kube/config" - func init() { - if home := homedir.HomeDir(); home != "" { - CreateCmd.Flags().StringVar(&kubeConfig, "kubeconfig", defaultKubeConfig, "(optional) absolute path to the kubeconfig file") - } else { - CreateCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "absolute path to the kubeconfig file") - } - - CreateCmd.Flags().StringVar(&provider, "provider", "", "One of the supported providers (aws|local). Default is aws") - CreateCmd.Flags().MarkHidden("kubeconfig") + CreateCmd.Flags().StringVar(&provider, "provider", "local", "One of the supported providers (aws|local|minikube). Default is aws") + CreateCmd.MarkFlagRequired("provider") - viper.SetDefault("provider", "aws") } func create(cmd *cobra.Command, args []string) { fmt.Println("⚙️ Creating core with provider", provider) - if kubeConfig == defaultKubeConfig { - kubeConfig = filepath.Join(homedir.HomeDir(), ".kube", "config") + clientset, err := providers.GetProvider(providers.Provider(provider)) + if err != nil { + fmt.Println("provisioning cluster failed: ", err) + os.Exit(1) } - helm := New(kubeConfig, "develop", "default") + helm := New(clientset, "develop", "default") if err := helm.Setup(); err != nil { fmt.Println("setting up Helm failed with err: ", err) os.Exit(1) @@ -52,6 +42,7 @@ func create(cmd *cobra.Command, args []string) { fmt.Println("installing Helm charts failed with err: ", err) os.Exit(1) } + fmt.Println("🚀 Starting core with default components") fmt.Println("🎉 Your Airy Core is ready") fmt.Println("\t Link to the API") diff --git a/infrastructure/cli/cmd/create/helm.go b/infrastructure/cli/pkg/cmd/create/helm.go similarity index 90% rename from infrastructure/cli/cmd/create/helm.go rename to infrastructure/cli/pkg/cmd/create/helm.go index a06563cb6b..571735c1de 100644 --- a/infrastructure/cli/cmd/create/helm.go +++ b/infrastructure/cli/pkg/cmd/create/helm.go @@ -10,8 +10,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "os" ) const airyConfigMap = "airy-config-map" @@ -24,24 +22,12 @@ type Helm struct { clientset *kubernetes.Clientset } -func New(kubeConfigPath string, version string, namespace string) Helm { - config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) - if err != nil { - fmt.Println("Building kubeconfig failed with error: ", err) - os.Exit(1) - } - - clientSet, clientSetErr := kubernetes.NewForConfig(config) - if clientSetErr != nil { - fmt.Println("Building kubernetes client failed: ", err) - os.Exit(1) - } - +func New(clientset *kubernetes.Clientset, version string, namespace string) Helm { return Helm{ name: "helm-runner", namespace: namespace, version: version, - clientset: clientSet, + clientset: clientset, } } diff --git a/infrastructure/cli/cmd/root.go b/infrastructure/cli/pkg/cmd/root.go similarity index 96% rename from infrastructure/cli/cmd/root.go rename to infrastructure/cli/pkg/cmd/root.go index 44ab867eb5..79957a56fc 100644 --- a/infrastructure/cli/cmd/root.go +++ b/infrastructure/cli/pkg/cmd/root.go @@ -5,11 +5,11 @@ import ( "os" "path" - "cli/cmd/api" - "cli/cmd/config" - "cli/cmd/create" - "cli/cmd/status" - "cli/cmd/ui" + "cli/pkg/cmd/api" + "cli/pkg/cmd/config" + "cli/pkg/cmd/create" + "cli/pkg/cmd/status" + "cli/pkg/cmd/ui" homedir "github.com/mitchellh/go-homedir" "github.com/spf13/cobra" diff --git a/infrastructure/cli/cmd/status/BUILD b/infrastructure/cli/pkg/cmd/status/BUILD similarity index 91% rename from infrastructure/cli/cmd/status/BUILD rename to infrastructure/cli/pkg/cmd/status/BUILD index 8a34ee2516..88ec68cec6 100644 --- a/infrastructure/cli/cmd/status/BUILD +++ b/infrastructure/cli/pkg/cmd/status/BUILD @@ -4,7 +4,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "status", srcs = ["status.go"], - importpath = "cli/cmd/status", + importpath = "cli/pkg/cmd/status", visibility = ["//visibility:public"], deps = [ "//lib/go/httpclient", diff --git a/infrastructure/cli/cmd/status/status.go b/infrastructure/cli/pkg/cmd/status/status.go similarity index 100% rename from infrastructure/cli/cmd/status/status.go rename to infrastructure/cli/pkg/cmd/status/status.go diff --git a/infrastructure/cli/cmd/ui/BUILD b/infrastructure/cli/pkg/cmd/ui/BUILD similarity index 89% rename from infrastructure/cli/cmd/ui/BUILD rename to infrastructure/cli/pkg/cmd/ui/BUILD index 4e0191344f..3f236de9c1 100644 --- a/infrastructure/cli/cmd/ui/BUILD +++ b/infrastructure/cli/pkg/cmd/ui/BUILD @@ -4,7 +4,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "ui", srcs = ["ui.go"], - importpath = "cli/cmd/ui", + importpath = "cli/pkg/cmd/ui", visibility = ["//visibility:public"], deps = ["@com_github_spf13_cobra//:cobra"], ) diff --git a/infrastructure/cli/cmd/ui/ui.go b/infrastructure/cli/pkg/cmd/ui/ui.go similarity index 100% rename from infrastructure/cli/cmd/ui/ui.go rename to infrastructure/cli/pkg/cmd/ui/ui.go diff --git a/infrastructure/cli/pkg/providers/BUILD b/infrastructure/cli/pkg/providers/BUILD new file mode 100644 index 0000000000..09d2919cfe --- /dev/null +++ b/infrastructure/cli/pkg/providers/BUILD @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "providers", + srcs = ["providers.go"], + importpath = "cli/pkg/providers", + visibility = ["//visibility:public"], + deps = [ + "//infrastructure/cli/pkg/providers/aws", + "//infrastructure/cli/pkg/providers/minikube", + "@io_k8s_client_go//kubernetes:go_default_library", + "@io_k8s_client_go//tools/clientcmd:go_default_library", + ], +) diff --git a/infrastructure/cli/pkg/providers/aws/BUILD b/infrastructure/cli/pkg/providers/aws/BUILD new file mode 100644 index 0000000000..75f022eea6 --- /dev/null +++ b/infrastructure/cli/pkg/providers/aws/BUILD @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "aws", + srcs = ["aws.go"], + importpath = "cli/pkg/providers/aws", + visibility = ["//visibility:public"], + deps = ["@io_k8s_client_go//kubernetes:go_default_library"], +) diff --git a/infrastructure/cli/pkg/providers/aws/aws.go b/infrastructure/cli/pkg/providers/aws/aws.go new file mode 100644 index 0000000000..b60256cf2a --- /dev/null +++ b/infrastructure/cli/pkg/providers/aws/aws.go @@ -0,0 +1,14 @@ +package aws + +import ( + "fmt" + "k8s.io/client-go/kubernetes" + "os" +) + + +func Create() (*kubernetes.Clientset, error) { + fmt.Println("aws provider not yet implemented") + os.Exit(1) + return nil, nil +} diff --git a/infrastructure/cli/pkg/providers/minikube/BUILD b/infrastructure/cli/pkg/providers/minikube/BUILD new file mode 100644 index 0000000000..3ccc7114a4 --- /dev/null +++ b/infrastructure/cli/pkg/providers/minikube/BUILD @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "minikube", + srcs = ["minikube.go"], + importpath = "cli/pkg/providers/minikube", + visibility = ["//visibility:public"], + deps = ["@io_k8s_client_go//kubernetes:go_default_library"], +) diff --git a/infrastructure/cli/pkg/providers/minikube/minikube.go b/infrastructure/cli/pkg/providers/minikube/minikube.go new file mode 100644 index 0000000000..23aa78f563 --- /dev/null +++ b/infrastructure/cli/pkg/providers/minikube/minikube.go @@ -0,0 +1,14 @@ +package minikube + +import ( + "fmt" + "k8s.io/client-go/kubernetes" + "os" +) + +func Create() (*kubernetes.Clientset, error) { + fmt.Println("minikube provider not yet implemented") + os.Exit(1) + return nil, nil +} + diff --git a/infrastructure/cli/pkg/providers/providers.go b/infrastructure/cli/pkg/providers/providers.go new file mode 100644 index 0000000000..02f1cfe632 --- /dev/null +++ b/infrastructure/cli/pkg/providers/providers.go @@ -0,0 +1,41 @@ +package providers + +import ( + "cli/pkg/providers/aws" + "cli/pkg/providers/minikube" + "fmt" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "os" +) + +type Provider string + +const ( + Local Provider = "local" + Minikube Provider = "minikube" + Aws Provider = "aws" +) + +func GetProvider(providerName Provider) (*kubernetes.Clientset, error) { + if providerName == Minikube { + return minikube.Create() + } + + if providerName == Aws { + return aws.Create() + } + + // TODO remove this provider in #1041 + if providerName == Local { + config, err := clientcmd.BuildConfigFromFlags("", os.Getenv("KUBE_CONFIG_PATH")) + if err != nil { + fmt.Println("Building kubeconfig failed with error: ", err) + os.Exit(1) + } + + return kubernetes.NewForConfig(config) + } + + return nil, fmt.Errorf("unknown provider \"%v\"", providerName) +} diff --git a/infrastructure/scripts/provision/core.sh b/infrastructure/scripts/provision/core.sh index 285b86c248..888bd795b7 100755 --- a/infrastructure/scripts/provision/core.sh +++ b/infrastructure/scripts/provision/core.sh @@ -18,7 +18,7 @@ wget -qnv https://airy-core-binaries.s3.amazonaws.com/"${AIRY_VERSION}"/linux/am chmod +x airy mv airy /usr/local/bin/ airy init -airy create --kubeconfig /etc/rancher/k3s/k3s.yaml +KUBE_CONFIG_PATH=/etc/rancher/k3s/k3s.yaml airy create --provider=local if [[ -f "${INFRASTRUCTURE_PATH}"/airy.yaml ]]; then airy config apply --kube-config /etc/rancher/k3s/k3s.yaml --config "${INFRASTRUCTURE_PATH}"/airy.yaml From 42d590f18f34a225ad4a1c219b37b191b985e216 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 09:50:34 +0100 Subject: [PATCH 27/43] Bump @types/react-router-dom from 5.1.3 to 5.1.7 (#1157) Bumps [@types/react-router-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-router-dom) from 5.1.3 to 5.1.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-router-dom) Signed-off-by: dependabot[bot] <support@github.com> 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 40631262ae..a3dcff703c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@types/react": "16.9.34", "@types/react-dom": "16.9.2", "@types/react-redux": "7.1.16", - "@types/react-router-dom": "^5.1.0", + "@types/react-router-dom": "^5.1.7", "camelcase-keys": "^6.2.2", "core-js": "3", "linkifyjs": "^2.1.9", diff --git a/yarn.lock b/yarn.lock index c6ae86e225..66396f28b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1952,10 +1952,10 @@ hoist-non-react-statics "^3.3.0" redux "^4.0.0" -"@types/react-router-dom@^5.1.0": - version "5.1.3" - resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.3.tgz" - integrity sha512-pCq7AkOvjE65jkGS5fQwQhvUp4+4PVD9g39gXLZViP2UqFiFzsEpB3PKf0O6mdbKsewSK8N14/eegisa/0CwnA== +"@types/react-router-dom@^5.1.7": + version "5.1.7" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.7.tgz#a126d9ea76079ffbbdb0d9225073eb5797ab7271" + integrity sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg== dependencies: "@types/history" "*" "@types/react" "*" From 6a3cfd70b2296fb2db27606fecd5734c0306d0b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 09:50:55 +0100 Subject: [PATCH 28/43] Bump lodash-es from 4.17.15 to 4.17.21 (#1156) Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> 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 a3dcff703c..7fd0351e9a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "camelcase-keys": "^6.2.2", "core-js": "3", "linkifyjs": "^2.1.9", - "lodash-es": "^4.17.15", + "lodash-es": "^4.17.21", "preact": "^10.5.12", "react": "16.12.0", "react-dom": "16.12.0", diff --git a/yarn.lock b/yarn.lock index 66396f28b1..a10f8e50ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6039,10 +6039,10 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash-es@^4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz" - integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== +lodash-es@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== lodash.camelcase@^4.3.0: version "4.3.0" From ae3ccc813f73e18de2a380ad7d2e881ae3c7f56f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 10:00:11 +0100 Subject: [PATCH 29/43] Bump prettier from 1.19.1 to 2.2.1 (#1147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump prettier from 1.19.1 to 2.2.1 Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.2.1. - [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/1.19.1...2.2.1) Signed-off-by: dependabot[bot] <support@github.com> * Make prettier 2 happy * Integrate patched bazel-tools prettier rules * fix docs prettier rule Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: lucapette <ciao@lucapette.me> Co-authored-by: Christoph Pröschel <chris@airy.co> --- .prettierignore | 1 + .prettierrc.json | 24 ------------- BUILD | 8 ++++- README.md | 25 +++++++------- WORKSPACE | 2 +- docs/BUILD.bazel | 10 ------ docs/docs/sources/chat-plugin.md | 2 +- frontend/README.md | 3 +- frontend/chat-plugin/src/websocket/index.ts | 4 +-- frontend/ui/README.md | 20 +++++------ .../src/actions/conversationsFilter/index.ts | 2 +- frontend/ui/src/actions/tags/index.tsx | 10 +++--- lib/typescript/httpclient/README.md | 34 +++++++++---------- .../endpoints/connectChatPluginChannel.ts | 2 +- .../endpoints/connectFacebookChannel.ts | 2 +- .../httpclient/endpoints/disconnectChannel.ts | 2 +- .../endpoints/exploreFacebookChannels.ts | 2 +- .../endpoints/getConversationInfo.ts | 2 +- .../httpclient/endpoints/listChannels.ts | 2 +- .../httpclient/endpoints/listConversations.ts | 2 +- .../httpclient/endpoints/listMessages.ts | 4 ++- .../httpclient/endpoints/listTags.ts | 2 +- .../httpclient/endpoints/readConversations.ts | 2 +- .../httpclient/endpoints/sendMessages.ts | 2 +- .../httpclient/endpoints/tagConversation.ts | 2 +- .../httpclient/endpoints/updateChannel.ts | 2 +- .../httpclient/endpoints/updateTag.ts | 2 +- lib/typescript/websocketclient/README.md | 7 ++-- package.json | 2 +- yarn.lock | 8 ++--- 30 files changed, 82 insertions(+), 110 deletions(-) delete mode 100644 .prettierrc.json diff --git a/.prettierignore b/.prettierignore index 5f0516bbca..275dce31e8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ docs/docs/cli/reference.md build/ +bazel-* diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 4e5a49f6ce..0000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "bracketSpacing": false, - "singleQuote": true, - "jsxBracketSameLine": true, - "semi": true, - "trailingComma": "es5", - "printWidth": 120, - "overrides": [ - { - "files": "*.{ts,tsx}", - "options": { - "parser": "typescript" - } - }, - { - "files": "*.md", - "options": { - "singleQuote": false, - "quoteProps": "preserve", - "trailingComma": "none" - } - } - ] -} diff --git a/BUILD b/BUILD index b4c444fd97..4004fa804c 100644 --- a/BUILD +++ b/BUILD @@ -1,4 +1,5 @@ load("@com_github_airyhq_bazel_tools//lint:buildifier.bzl", "check_pkg") +load("@com_github_airyhq_bazel_tools//lint:prettier.bzl", "fix_prettier") load("@rules_java//java:defs.bzl", "java_library", "java_plugin") load("@io_bazel_rules_docker//container:container.bzl", "container_image") load("@com_github_atlassian_bazel_tools//multirun:def.bzl", "multirun") @@ -12,10 +13,15 @@ alias( actual = "//:bazel.tsconfig.json", ) +fix_prettier( + name = "fix_prettier", + ignore = ":.prettierignore", +) + multirun( name = "fix", commands = [ - "@com_github_airyhq_bazel_tools//lint:fix_prettier", + ":fix_prettier", "@com_github_airyhq_bazel_tools//lint:fix_buildifier", ], visibility = ["//visibility:public"], diff --git a/README.md b/README.md index 8d88711076..0e91801169 100644 --- a/README.md +++ b/README.md @@ -13,26 +13,25 @@ [](https://github.com/airyhq/airy/blob/develop/LICENSE) [](https://github.com/airyhq/airy/projects) - Airy Core is an open source, fully-featured, production ready messaging platform. With Airy you can process conversational data from a variety of sources: - - **Facebook** - - **WhatsApp** - - **Google's Business Messages** - - **SMS** - - **Website Chat Plugins** - - **Twilio** - - **Your own conversational channels** +- **Facebook** +- **WhatsApp** +- **Google's Business Messages** +- **SMS** +- **Website Chat Plugins** +- **Twilio** +- **Your own conversational channels** You can then use Airy to: - - **Unify your messaging channels** - - **Stream your conversational data wherever you want** - - **Integrate with different NLP frameworks** - - **Mediate open requests with Agents via our messaging UI** - - **Analyze your conversations** +- **Unify your messaging channels** +- **Stream your conversational data wherever you want** +- **Integrate with different NLP frameworks** +- **Mediate open requests with Agents via our messaging UI** +- **Analyze your conversations** Since Airy's infrastructure is built around Apache Kafka, it can process a large amount of conversations and messages simultaneously and stream the relevant diff --git a/WORKSPACE b/WORKSPACE index 9555948cea..2537290e54 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,7 +9,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") # Airy Bazel tools git_repository( name = "com_github_airyhq_bazel_tools", - commit = "da1aa5af0f03767d08ed8af478248d3709342252", + commit = "67692d45534663c18ad5d1061f367fab23a98415", remote = "https://github.com/airyhq/bazel-tools.git", shallow_since = "1614184856 +0100", ) diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index a8a534a616..d4e4f04548 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -3,16 +3,6 @@ load("@com_github_airyhq_bazel_tools//lint:prettier.bzl", "prettier") prettier( name = "prettier", - srcs = glob([ - "**/*.md", - "**/*.js", - "**/*.jsx", - "**/*.ts", - "**/*.tsx", - "**/*.scss", - "**/*.css", - ]), - config = "//:.prettierrc.json", ignore = "//:.prettierignore", ) diff --git a/docs/docs/sources/chat-plugin.md b/docs/docs/sources/chat-plugin.md index 22c3dbd6c5..565a212576 100644 --- a/docs/docs/sources/chat-plugin.md +++ b/docs/docs/sources/chat-plugin.md @@ -30,7 +30,7 @@ the `<head>` section: ```html <script> - (function(w, d, s, n) { + (function (w, d, s, n) { w[n] = w[n] || {}; w[n].channelId = "CHANNEL_ID"; w[n].host = "SCRIPT_HOST"; diff --git a/frontend/README.md b/frontend/README.md index fb7644ef98..f051ada08a 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -10,10 +10,9 @@ The Frontend section of Airy Core contains the user interaction(UI) related code Here is a quick introduction to the frontend projects: - - `UI` - The [UI project](https://github.com/airyhq/airy/tree/develop/frontend/ui) is a minimum UI implementation of the provided [Airy Core API](https://docs.airy.co/api/http). + The [UI project](https://github.com/airyhq/airy/tree/develop/frontend/ui) is a minimum UI implementation of the provided [Airy Core API](https://docs.airy.co/api/http). - `Chat_Plugin` diff --git a/frontend/chat-plugin/src/websocket/index.ts b/frontend/chat-plugin/src/websocket/index.ts index 990f011d16..9e2d804e3c 100644 --- a/frontend/chat-plugin/src/websocket/index.ts +++ b/frontend/chat-plugin/src/websocket/index.ts @@ -47,7 +47,7 @@ class WebSocket { connectHeaders: { Authorization: `Bearer ${token}`, }, - debug: function(str) { + debug: function (str) { console.info(str); }, reconnectDelay: 5000, @@ -57,7 +57,7 @@ class WebSocket { this.client.onConnect = this.onConnect; - this.client.onStompError = function(frame: IFrame) { + this.client.onStompError = function (frame: IFrame) { console.error('Broker reported error: ' + frame.headers['message']); console.error('Additional details: ' + frame.body); }; diff --git a/frontend/ui/README.md b/frontend/ui/README.md index 93effaa08c..d442200f06 100644 --- a/frontend/ui/README.md +++ b/frontend/ui/README.md @@ -3,12 +3,10 @@ </a> </p> - ### Airy Demo UI The Airy UI is a fully featured user interactive frontend project that showcases Airy Core features. It enables users to experience the functionalities of Airy Core. - - [Airy Demo UI](#airy-demo-ui) - [Prerequisites](#prerequisites) - [Building Airy Demo UI](#building-airy-demo-ui) @@ -19,10 +17,9 @@ The Airy UI is a fully featured user interactive frontend project that showcases ### Prerequisites -* [Node.js](https://nodejs.org/) version 10 or newer -* [Git](https://www.atlassian.com/git/tutorials/install-git/) for your platform -* [Bazel](https://docs.bazel.build/versions/3.7.0/install.html) for building and testing the app - +- [Node.js](https://nodejs.org/) version 10 or newer +- [Git](https://www.atlassian.com/git/tutorials/install-git/) for your platform +- [Bazel](https://docs.bazel.build/versions/3.7.0/install.html) for building and testing the app ### Building Airy Demo UI @@ -33,21 +30,24 @@ $ git clone https://github.com/airyhq/airy $ cd airy $ ./scripts/bootstrap.sh (Takes a few minutes) ``` -When the bootstrap process finishes, open another terminal and run ``` $ ibazel run //frontend/demo:bundle_server ``` + +When the bootstrap process finishes, open another terminal and run `$ ibazel run //frontend/demo:bundle_server` Then open `http://localhost:8080/` in a web browser to access the Airy Demo UI ### Installation + The bootstrap installation requires [Vagrant](https://www.vagrantup.com/downloads) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads). If they are not -found, the script ```$ ./scripts/bootstrap.sh``` will attempt to install them for you. Check out our [test deployment guide](/docs/docs/getting-started/deployment/test-environment.md) for detailed information. +found, the script `$ ./scripts/bootstrap.sh` will attempt to install them for you. Check out our [test deployment guide](/docs/docs/getting-started/deployment/test-environment.md) for detailed information. ### Authentication In order to communicate with our API endpoints, you need a valid [JWT](https://jwt.io/) token. To get a valid token you first need to signup using the signup [endpoint](#endpoints) and then login using the login [endpoint](#endpoints). ### Endpoints - To communicate with our signup endpoint and register your email, open another terminal and type in the terminal ```curl -X POST -H 'Content-Type: application/json' -d '{"first_name": "your_name","last_name": "your_last_name","password": "your_password","email": "your_email@airy.co"}' http://api.airy/users.signup``` - To sign in, type in the terminal ```token=$(echo $(curl -H 'Content-Type: application/json' -d \"{ \\"email\":\"your_email@airy.co\",\\"password\":\"your_last_name\" \}" api.airy/users.login) | jq -r '.token')``` +To communicate with our signup endpoint and register your email, open another terminal and type in the terminal `curl -X POST -H 'Content-Type: application/json' -d '{"first_name": "your_name","last_name": "your_last_name","password": "your_password","email": "your_email@airy.co"}' http://api.airy/users.signup` + +To sign in, type in the terminal `token=$(echo $(curl -H 'Content-Type: application/json' -d \"{ \\"email\":\"your_email@airy.co\",\\"password\":\"your_last_name\" \}" api.airy/users.login) | jq -r '.token')` Aside from Curl, [PostMan](https://www.postman.com/downloads/) and other API testing tools could also be used to access the endpoints. diff --git a/frontend/ui/src/actions/conversationsFilter/index.ts b/frontend/ui/src/actions/conversationsFilter/index.ts index 8a7bbb0cff..5f9db8e96f 100644 --- a/frontend/ui/src/actions/conversationsFilter/index.ts +++ b/frontend/ui/src/actions/conversationsFilter/index.ts @@ -48,7 +48,7 @@ export const setFilter = (filter: ConversationFilter) => { }; export const resetFilter = () => { - return function(dispatch: Dispatch<any>, state: () => StateModel) { + return function (dispatch: Dispatch<any>, state: () => StateModel) { dispatch(resetFilteredConversationAction()); const currentFilter = state().data.conversations.filtered.currentFilter; const newFilter: ConversationFilter = {displayName: currentFilter.displayName}; diff --git a/frontend/ui/src/actions/tags/index.tsx b/frontend/ui/src/actions/tags/index.tsx index a096ecec99..b18ad2a578 100644 --- a/frontend/ui/src/actions/tags/index.tsx +++ b/frontend/ui/src/actions/tags/index.tsx @@ -19,7 +19,7 @@ export const filterTagAction = createAction(SET_TAG_FILTER, resolve => (filter: export const errorTagAction = createAction(ERROR_TAG, resolve => (status: string) => resolve(status)); export function listTags() { - return function(dispatch: Dispatch<any>) { + return function (dispatch: Dispatch<any>) { return HttpClientInstance.listTags().then((response: Tag[]) => { dispatch(fetchTagAction(response)); }); @@ -41,13 +41,13 @@ export function createTag(requestPayload: CreateTagRequestPayload) { } export function updateTag(tag: Tag) { - return function(dispatch: Dispatch<any>) { + return function (dispatch: Dispatch<any>) { HttpClientInstance.updateTag(tag).then(() => dispatch(editTagAction(tag))); }; } export function deleteTag(id: string) { - return function(dispatch: Dispatch<any>) { + return function (dispatch: Dispatch<any>) { HttpClientInstance.deleteTag(id).then(() => { dispatch(deleteTagAction(id)); }); @@ -55,13 +55,13 @@ export function deleteTag(id: string) { } export function filterTags(filter: string) { - return function(dispatch: Dispatch<any>) { + return function (dispatch: Dispatch<any>) { dispatch(filterTagAction(filter)); }; } export function errorTag(status: string) { - return function(dispatch: Dispatch<any>) { + return function (dispatch: Dispatch<any>) { dispatch(errorTagAction(status)); }; } diff --git a/lib/typescript/httpclient/README.md b/lib/typescript/httpclient/README.md index c810ffd8b6..0c4a31241b 100644 --- a/lib/typescript/httpclient/README.md +++ b/lib/typescript/httpclient/README.md @@ -1,55 +1,55 @@ - -### HttpClient Library +### HttpClient Library The HttpClient Library includes a HTTP client for making requests to Airy's API. The library exports a HttpClient class with public methods that make requests to Airy's API. -To use the library, you need to instantiate the class with the authentification token and your api url. +To use the library, you need to instantiate the class with the authentification token and your api url. Both the authentification token and api url are optional (the default api url is "http://api.airy"), but communication with the endpoints always requires a token, except for the /users.login and /users.signup endpoints. For example: -``` +``` import { HttpClient} from 'httpclient'; const myInstance = new HttpClient(authtoken, apiUrl); myInstance.listChannels() -``` +``` -Here is a list of the public methods the library's class includes: +Here is a list of the public methods the library's class includes: CHANNELS + - listChannels -- exploreChannels +- exploreChannels - connectChannel -- disconnectChannel +- disconnectChannel - connectFacebookChannel - exploreFacebookChannels -CONVERSATIONS +CONVERSATIONS + - listConversations - getConversationInfo -- readConversations +- readConversations - tagConversation - untagConversation -MESSAGES -- listMessages +MESSAGES + +- listMessages - sendMessages +TAGS -TAGS - listTags - createTag - updateTag - deleteTag -USER -- loginViaEmail - - +USER +- loginViaEmail diff --git a/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts b/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts index 1056706fb4..1411d6d3e7 100644 --- a/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts +++ b/lib/typescript/httpclient/endpoints/connectChatPluginChannel.ts @@ -3,7 +3,7 @@ import {ChannelPayload, ConnectChatPluginRequestPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.connectChatPluginChannel = async function( +export default HttpClient.prototype.connectChatPluginChannel = async function ( requestPayload: ConnectChatPluginRequestPayload ) { const response: ChannelPayload = await this.doFetchFromBackend( diff --git a/lib/typescript/httpclient/endpoints/connectFacebookChannel.ts b/lib/typescript/httpclient/endpoints/connectFacebookChannel.ts index 4998dd338d..ddbbd22385 100644 --- a/lib/typescript/httpclient/endpoints/connectFacebookChannel.ts +++ b/lib/typescript/httpclient/endpoints/connectFacebookChannel.ts @@ -3,7 +3,7 @@ import {ChannelPayload, ConnectChannelRequestPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.connectFacebookChannel = async function( +export default HttpClient.prototype.connectFacebookChannel = async function ( requestPayload: ConnectChannelRequestPayload ) { const response: ChannelPayload = await this.doFetchFromBackend('channels.connect', camelcaseKeys(requestPayload)); diff --git a/lib/typescript/httpclient/endpoints/disconnectChannel.ts b/lib/typescript/httpclient/endpoints/disconnectChannel.ts index 78794d7d22..4841e1fa4c 100644 --- a/lib/typescript/httpclient/endpoints/disconnectChannel.ts +++ b/lib/typescript/httpclient/endpoints/disconnectChannel.ts @@ -1,7 +1,7 @@ import {DisconnectChannelRequestPayload} from '../payload'; import {HttpClient} from '../client'; -export default HttpClient.prototype.disconnectChannel = async function( +export default HttpClient.prototype.disconnectChannel = async function ( source: string, requestPayload: DisconnectChannelRequestPayload ) { diff --git a/lib/typescript/httpclient/endpoints/exploreFacebookChannels.ts b/lib/typescript/httpclient/endpoints/exploreFacebookChannels.ts index a226b8093f..9f69b1c5d7 100644 --- a/lib/typescript/httpclient/endpoints/exploreFacebookChannels.ts +++ b/lib/typescript/httpclient/endpoints/exploreFacebookChannels.ts @@ -3,7 +3,7 @@ import {ChannelsPayload, ExploreChannelRequestPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.exploreFacebookChannels = async function( +export default HttpClient.prototype.exploreFacebookChannels = async function ( requestPayload: ExploreChannelRequestPayload ) { const response: ChannelsPayload = await this.doFetchFromBackend('facebook.channels.explore', requestPayload); diff --git a/lib/typescript/httpclient/endpoints/getConversationInfo.ts b/lib/typescript/httpclient/endpoints/getConversationInfo.ts index bd04ca6480..41cdde2eb2 100644 --- a/lib/typescript/httpclient/endpoints/getConversationInfo.ts +++ b/lib/typescript/httpclient/endpoints/getConversationInfo.ts @@ -3,7 +3,7 @@ import {ConversationPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.getConversationInfo = async function(conversationId: string) { +export default HttpClient.prototype.getConversationInfo = async function (conversationId: string) { const response: ConversationPayload = await this.doFetchFromBackend('conversations.info', { conversation_id: conversationId, }); diff --git a/lib/typescript/httpclient/endpoints/listChannels.ts b/lib/typescript/httpclient/endpoints/listChannels.ts index 54f34e9383..3b65287cc0 100644 --- a/lib/typescript/httpclient/endpoints/listChannels.ts +++ b/lib/typescript/httpclient/endpoints/listChannels.ts @@ -3,7 +3,7 @@ import {ChannelsPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.listChannels = async function() { +export default HttpClient.prototype.listChannels = async function () { const response: ChannelsPayload = await this.doFetchFromBackend('channels.list', {}); return camelcaseKeys(response.data, {deep: true, stopPaths: ['metadata.userData']}); diff --git a/lib/typescript/httpclient/endpoints/listConversations.ts b/lib/typescript/httpclient/endpoints/listConversations.ts index 3a4e2a56cd..50c11fbb7c 100644 --- a/lib/typescript/httpclient/endpoints/listConversations.ts +++ b/lib/typescript/httpclient/endpoints/listConversations.ts @@ -3,7 +3,7 @@ import {PaginatedPayload, ConversationPayload, ListConversationsRequestPayload} const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.listConversations = async function( +export default HttpClient.prototype.listConversations = async function ( conversationListRequest: ListConversationsRequestPayload ) { conversationListRequest.page_size = conversationListRequest.page_size ?? 10; diff --git a/lib/typescript/httpclient/endpoints/listMessages.ts b/lib/typescript/httpclient/endpoints/listMessages.ts index c2bd9b64ed..049a39d7cc 100644 --- a/lib/typescript/httpclient/endpoints/listMessages.ts +++ b/lib/typescript/httpclient/endpoints/listMessages.ts @@ -3,7 +3,9 @@ import {ListMessagesRequestPayload, PaginatedPayload, MessagePayload} from '../p const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.listMessages = async function(conversationListRequest: ListMessagesRequestPayload) { +export default HttpClient.prototype.listMessages = async function ( + conversationListRequest: ListMessagesRequestPayload +) { conversationListRequest.pageSize = conversationListRequest.pageSize ?? 10; conversationListRequest.cursor = conversationListRequest.cursor ?? null; diff --git a/lib/typescript/httpclient/endpoints/listTags.ts b/lib/typescript/httpclient/endpoints/listTags.ts index 1e0ea9ab7a..b70f76f303 100644 --- a/lib/typescript/httpclient/endpoints/listTags.ts +++ b/lib/typescript/httpclient/endpoints/listTags.ts @@ -2,7 +2,7 @@ import {ListTagsResponsePayload} from '../payload'; import {Tag} from '../model'; import {HttpClient} from '../client'; -export default HttpClient.prototype.listTags = async function() { +export default HttpClient.prototype.listTags = async function () { const response: ListTagsResponsePayload = await this.doFetchFromBackend('tags.list'); const tagMapper = { diff --git a/lib/typescript/httpclient/endpoints/readConversations.ts b/lib/typescript/httpclient/endpoints/readConversations.ts index 6c1ca274c5..719d9b46c3 100644 --- a/lib/typescript/httpclient/endpoints/readConversations.ts +++ b/lib/typescript/httpclient/endpoints/readConversations.ts @@ -1,6 +1,6 @@ import {HttpClient} from '../client'; -export default HttpClient.prototype.readConversations = async function(conversationId: string) { +export default HttpClient.prototype.readConversations = async function (conversationId: string) { await this.doFetchFromBackend('conversations.read', {conversation_id: conversationId}); return Promise.resolve(true); }; diff --git a/lib/typescript/httpclient/endpoints/sendMessages.ts b/lib/typescript/httpclient/endpoints/sendMessages.ts index 0a3356c862..d4b903454c 100644 --- a/lib/typescript/httpclient/endpoints/sendMessages.ts +++ b/lib/typescript/httpclient/endpoints/sendMessages.ts @@ -1,7 +1,7 @@ import {SendMessagesRequestPayload, MessagePayload} from '../payload'; import {HttpClient} from '../client'; -export default HttpClient.prototype.sendMessages = async function(requestPayload: SendMessagesRequestPayload) { +export default HttpClient.prototype.sendMessages = async function (requestPayload: SendMessagesRequestPayload) { const response: MessagePayload = await this.doFetchFromBackend('messages.send', { conversation_id: requestPayload.conversationId, message: requestPayload.message, diff --git a/lib/typescript/httpclient/endpoints/tagConversation.ts b/lib/typescript/httpclient/endpoints/tagConversation.ts index e002c8fad3..d4319fe489 100644 --- a/lib/typescript/httpclient/endpoints/tagConversation.ts +++ b/lib/typescript/httpclient/endpoints/tagConversation.ts @@ -1,7 +1,7 @@ import {TagConversationRequestPayload} from '../payload'; import {HttpClient} from '../client'; -export default HttpClient.prototype.tagConversation = async function(requestPayload: TagConversationRequestPayload) { +export default HttpClient.prototype.tagConversation = async function (requestPayload: TagConversationRequestPayload) { await this.doFetchFromBackend('conversations.tag', { conversation_id: requestPayload.conversationId, tag_id: requestPayload.tagId, diff --git a/lib/typescript/httpclient/endpoints/updateChannel.ts b/lib/typescript/httpclient/endpoints/updateChannel.ts index 9693892926..908dcd0c31 100644 --- a/lib/typescript/httpclient/endpoints/updateChannel.ts +++ b/lib/typescript/httpclient/endpoints/updateChannel.ts @@ -3,7 +3,7 @@ import {ChannelPayload, UpdateChannelRequestPayload} from '../payload'; const camelcaseKeys = require('camelcase-keys'); import {HttpClient} from '../client'; -export default HttpClient.prototype.updateChannel = async function(requestPayload: UpdateChannelRequestPayload) { +export default HttpClient.prototype.updateChannel = async function (requestPayload: UpdateChannelRequestPayload) { const response: ChannelPayload = await this.doFetchFromBackend(`channels.update`, { channel_id: requestPayload.channelId, name: requestPayload.name, diff --git a/lib/typescript/httpclient/endpoints/updateTag.ts b/lib/typescript/httpclient/endpoints/updateTag.ts index 49dc5713cd..f0177a6610 100644 --- a/lib/typescript/httpclient/endpoints/updateTag.ts +++ b/lib/typescript/httpclient/endpoints/updateTag.ts @@ -1,7 +1,7 @@ import {Tag} from '../model'; import {HttpClient} from '../client'; -export default HttpClient.prototype.updateTag = async function(tag: Tag) { +export default HttpClient.prototype.updateTag = async function (tag: Tag) { await this.doFetchFromBackend('tags.update', {...tag}); return Promise.resolve(true); }; diff --git a/lib/typescript/websocketclient/README.md b/lib/typescript/websocketclient/README.md index d7146dd5bf..e3c1a075b0 100644 --- a/lib/typescript/websocketclient/README.md +++ b/lib/typescript/websocketclient/README.md @@ -1,5 +1,4 @@ - -### WebSocketClient Library +### WebSocketClient Library The WebSocketClient Library includes a WebSocket client for Airy's WebSocket API. @@ -9,9 +8,9 @@ For each message that is delivered through the WebSocket, a method is called. For example: -``` +``` import { WebSocketClient} from 'websocketclient'; const myInstance = new WebSocketClient(authtoken, {onMessage: (conversationId, channelId, message) => console.log(message)}); -``` +``` diff --git a/package.json b/package.json index 7fd0351e9a..e692a5ef3f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "html-webpack-plugin": "^4.2.0", "minimist": "^1.2.5", "node-sass": "^4.14.0", - "prettier": "^1.19.1", + "prettier": "^2.2.1", "react-hot-loader": "^4.13.0", "reselect": "4.0.0", "sass-loader": "^8.0.2", diff --git a/yarn.lock b/yarn.lock index a10f8e50ef..53f2d2e080 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7321,10 +7321,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +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== pretty-bytes@^5.4.1: version "5.6.0" From 4625547691af62e1c4873d91b7231caf20a300c0 Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Fri, 5 Mar 2021 11:54:21 +0100 Subject: [PATCH 30/43] =?UTF-8?q?[#1113]=20Chat=20Plugin:=20keep=20text=20?= =?UTF-8?q?in=20input=20bar=20if=E2=80=A6=20(#1143)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …contact minimizes chat plugin closes #1113 --- .../AiryInputBar/index.module.scss | 2 +- .../airyRenderProps/AiryInputBar/index.tsx | 70 +++++++++---------- .../chat-plugin/src/components/chat/index.tsx | 5 +- 3 files changed, 38 insertions(+), 39 deletions(-) diff --git a/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.module.scss b/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.module.scss index fea6043eb3..4a7d38c38a 100644 --- a/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.module.scss +++ b/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.module.scss @@ -7,7 +7,7 @@ .textArea { border-radius: 8px; resize: none; - overflow: hidden; + overflow: auto; height: 32px; min-height: 32px; width: 100%; diff --git a/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.tsx b/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.tsx index ec18db1b73..cd12b07bb7 100644 --- a/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.tsx +++ b/frontend/chat-plugin/src/airyRenderProps/AiryInputBar/index.tsx @@ -1,70 +1,66 @@ -import React from 'react'; -import {useState, useEffect} from 'react'; +import React, {ChangeEvent, FormEvent, KeyboardEvent, createRef, useEffect} from 'react'; import style from './index.module.scss'; type Props = { sendMessage: (text: string) => void; + messageString: string; + setMessageString: (text: string) => void; }; const AiryInputBar = (props: Props) => { - const [messageString, setMessageString] = useState(''); + const textInputRef = createRef<HTMLTextAreaElement>(); useEffect(() => { - setMessageString(''); + textInputRef.current.selectionStart = props.messageString.length; + textInputRef.current.selectionEnd = props.messageString.length; }, []); - const resizeTextarea = e => { - if (e.target.style) { - e.target.style.height = '32px'; - e.target.style.height = `${Math.min(e.target.scrollHeight, 128)}px`; + const resizeTextarea = () => { + const textArea = textInputRef.current; + if (textArea) { + const outerHeight = parseInt(window.getComputedStyle(textArea).height, 10); + const diff = outerHeight - textArea.clientHeight; + // Set this to 0 first to get the calculation correct. Sadly this is needed. + textArea.style.height = '0'; + textArea.style.height = Math.min(128, textArea.scrollHeight + diff) + 'px'; } }; - const onSubmit = e => { - e.preventDefault(); - if (messageString.length) { - setMessageString(''); - props.sendMessage(messageString); + const onSubmit = (event: FormEvent<HTMLFormElement>) => { + event.preventDefault(); + if (props.messageString.length) { + props.setMessageString(''); + props.sendMessage(props.messageString); } }; - const handleInputAndChange = e => { - const localValue = e.target.value; - setMessageString(localValue); + const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => { + resizeTextarea(); + props.setMessageString(event.target.value); }; - const handleLocalChange = e => { - resizeTextarea(e); - handleInputAndChange(e); - }; - - const handleLocalOnInput = e => { - resizeTextarea(e); - handleInputAndChange(e); - }; - - const handleLocalKeyDown = e => { - resizeTextarea(e); - const localValue = e.target.value; - if (e.key === 'Enter') { + const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => { + resizeTextarea(); + if (event.key === 'Enter') { + const localValue = event.currentTarget.value; if (localValue.length) { - e.preventDefault(); - setMessageString(''); + event.preventDefault(); + props.setMessageString(''); props.sendMessage(localValue); } } }; return ( - <form className={style.inputBar} onSubmit={e => onSubmit(e)}> + <form className={style.inputBar} onSubmit={onSubmit}> <textarea + ref={textInputRef} className={style.textArea} placeholder={'Enter a message...'} autoFocus={true} - onChange={handleLocalChange} - onInput={handleLocalOnInput} - onKeyDown={handleLocalKeyDown} - value={messageString} + onChange={handleChange} + onKeyDown={handleKeyDown} + value={props.messageString} /> <button className={style.sendButton} type="submit"> <svg width="32px" height="28px" version="1.1" viewBox="0 0 32 32"> diff --git a/frontend/chat-plugin/src/components/chat/index.tsx b/frontend/chat-plugin/src/components/chat/index.tsx index 64af0ed075..35bc45cb79 100644 --- a/frontend/chat-plugin/src/components/chat/index.tsx +++ b/frontend/chat-plugin/src/components/chat/index.tsx @@ -41,6 +41,7 @@ const Chat = (props: Props) => { const [animation, setAnimation] = useState(''); const [isChatHidden, setIsChatHidden] = useState(true); const [messages, setMessages] = useState<Message[]>([defaultWelcomeMessage]); + const [messageString, setMessageString] = useState(''); useEffect(() => { ws = new WebSocket(props.channelId, onReceive, setInitialMessages, getResumeTokenFromStorage(props.channelId)); @@ -119,7 +120,9 @@ const Chat = (props: Props) => { const inputBar = props.inputBarProp ? () => props.inputBarProp(ctrl) - : () => <AiryInputBar sendMessage={sendMessage} />; + : () => ( + <AiryInputBar sendMessage={sendMessage} messageString={messageString} setMessageString={setMessageString} /> + ); const bubble = props.bubbleProp ? () => props.bubbleProp(ctrl) From d49f166cb5733b25c7964f11188b68dedaaa8bf9 Mon Sep 17 00:00:00 2001 From: lucapette <ciao@lucapette.me> Date: Fri, 5 Mar 2021 12:20:19 +0100 Subject: [PATCH 31/43] [#1161] Fix metadata 404 (#1162) Fixes #1161 --- infrastructure/helm-chart/templates/ingress.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/infrastructure/helm-chart/templates/ingress.yaml b/infrastructure/helm-chart/templates/ingress.yaml index a857837043..71484d22f2 100644 --- a/infrastructure/helm-chart/templates/ingress.yaml +++ b/infrastructure/helm-chart/templates/ingress.yaml @@ -78,6 +78,13 @@ spec: name: api-communication port: number: 80 + - path: /metadata.upsert + pathType: Prefix + backend: + service: + name: api-communication + port: + number: 80 - path: /client.config pathType: Prefix backend: From 7669181774057cd1dc4205261448e4e53714dd1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 13:55:40 +0100 Subject: [PATCH 32/43] Bump react-router-dom from 5.1.2 to 5.2.0 (#1155) Bumps [react-router-dom](https://github.com/ReactTraining/react-router) from 5.1.2 to 5.2.0. - [Release notes](https://github.com/ReactTraining/react-router/releases) - [Changelog](https://github.com/ReactTraining/react-router/blob/master/CHANGELOG.md) - [Commits](https://github.com/ReactTraining/react-router/compare/v5.1.2...v5.2.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e692a5ef3f..7aeeeceecd 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "react-facebook-login": "^4.1.1", "react-markdown": "^5.0.3", "react-redux": "7.2.2", - "react-router-dom": "5.1.2", + "react-router-dom": "5.2.0", "react-window": "1.8.5", "react-window-infinite-loader": "1.0.5", "redux": "^4.0.5", diff --git a/yarn.lock b/yarn.lock index 53f2d2e080..bea1df6bc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6410,6 +6410,14 @@ mini-create-react-context@^0.3.0: gud "^1.0.0" tiny-warning "^1.0.2" +mini-create-react-context@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e" + integrity sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== + dependencies: + "@babel/runtime" "^7.12.1" + tiny-warning "^1.0.3" + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" @@ -7635,6 +7643,19 @@ react-router-dom@5.1.2: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" +react-router-dom@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" + integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + loose-envify "^1.3.1" + prop-types "^15.6.2" + react-router "5.2.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + react-router@5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz" @@ -7651,6 +7672,22 @@ react-router@5.1.2: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" +react-router@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" + integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + hoist-non-react-statics "^3.1.0" + loose-envify "^1.3.1" + mini-create-react-context "^0.4.0" + path-to-regexp "^1.7.0" + prop-types "^15.6.2" + react-is "^16.6.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + react-window-infinite-loader@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/react-window-infinite-loader/-/react-window-infinite-loader-1.0.5.tgz" @@ -8950,7 +8987,7 @@ tiny-invariant@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz" integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== -tiny-warning@^1.0.0, tiny-warning@^1.0.2: +tiny-warning@^1.0.0, tiny-warning@^1.0.2, tiny-warning@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== From c196e5f63e7526b873876493ecefd945863caace Mon Sep 17 00:00:00 2001 From: Christoph Proeschel <proeschel.christoph@gmail.com> Date: Fri, 5 Mar 2021 14:36:20 +0100 Subject: [PATCH 33/43] [#1041] Restructure cli for building providers (#1159) --- docs/docs/cli/reference.md | 5 +- infrastructure/cli/pkg/cmd/create/BUILD | 3 ++ infrastructure/cli/pkg/cmd/create/create.go | 24 +++++++--- infrastructure/cli/pkg/kube/BUILD | 12 +++++ infrastructure/cli/pkg/kube/context.go | 41 +++++++++++++++++ infrastructure/cli/pkg/providers/BUILD | 5 +- infrastructure/cli/pkg/providers/aws/BUILD | 2 +- infrastructure/cli/pkg/providers/aws/aws.go | 12 +++-- .../cli/pkg/providers/minikube/BUILD | 2 +- .../cli/pkg/providers/minikube/minikube.go | 12 +++-- infrastructure/cli/pkg/providers/provider.go | 46 +++++++++++++++++++ infrastructure/cli/pkg/providers/providers.go | 41 ----------------- 12 files changed, 143 insertions(+), 62 deletions(-) create mode 100644 infrastructure/cli/pkg/kube/BUILD create mode 100644 infrastructure/cli/pkg/kube/context.go create mode 100644 infrastructure/cli/pkg/providers/provider.go delete mode 100644 infrastructure/cli/pkg/providers/providers.go diff --git a/docs/docs/cli/reference.md b/docs/docs/cli/reference.md index 0d33b26063..0a44465172 100644 --- a/docs/docs/cli/reference.md +++ b/docs/docs/cli/reference.md @@ -94,8 +94,9 @@ airy create [flags] #### Options ``` - -h, --help help for create - --provider string One of the supported providers (aws|local|minikube). Default is aws (default "local") + -h, --help help for create + --namespace string (optional) Kubernetes namespace that Airy should be installed to. (default "default") + --provider string One of the supported providers (aws|local|minikube). (default "local") ``` #### Options inherited from parent commands diff --git a/infrastructure/cli/pkg/cmd/create/BUILD b/infrastructure/cli/pkg/cmd/create/BUILD index 383a27d95b..6a7a91c3e9 100644 --- a/infrastructure/cli/pkg/cmd/create/BUILD +++ b/infrastructure/cli/pkg/cmd/create/BUILD @@ -18,6 +18,9 @@ go_library( ], importpath = "cli/pkg/cmd/create", visibility = ["//visibility:public"], + x_defs = { + "version": "{STABLE_VERSION}", + }, deps = [ "//infrastructure/cli/pkg/providers", "@com_github_spf13_cobra//:cobra", diff --git a/infrastructure/cli/pkg/cmd/create/create.go b/infrastructure/cli/pkg/cmd/create/create.go index 35f03a9860..df78e355ca 100644 --- a/infrastructure/cli/pkg/cmd/create/create.go +++ b/infrastructure/cli/pkg/cmd/create/create.go @@ -8,9 +8,10 @@ import ( ) var ( - provider string - version string - CreateCmd = &cobra.Command{ + provider string + namespace string + version string + CreateCmd = &cobra.Command{ Use: "create", Short: "Creates an instance of Airy Core", Long: ``, @@ -19,7 +20,8 @@ var ( ) func init() { - CreateCmd.Flags().StringVar(&provider, "provider", "local", "One of the supported providers (aws|local|minikube). Default is aws") + CreateCmd.Flags().StringVar(&provider, "provider", "local", "One of the supported providers (aws|local|minikube).") + CreateCmd.Flags().StringVar(&namespace, "namespace", "default", "(optional) Kubernetes namespace that Airy should be installed to.") CreateCmd.MarkFlagRequired("provider") } @@ -27,13 +29,21 @@ func init() { func create(cmd *cobra.Command, args []string) { fmt.Println("⚙️ Creating core with provider", provider) - clientset, err := providers.GetProvider(providers.Provider(provider)) + provider := providers.MustGet(providers.ProviderName(provider)) + + context, err := provider.Provision() + if err != nil { + fmt.Println("could not provision cluster: ", err) + os.Exit(1) + } + + clientset, err := context.GetClientSet() if err != nil { - fmt.Println("provisioning cluster failed: ", err) + fmt.Println("could not get clientset: ", err) os.Exit(1) } - helm := New(clientset, "develop", "default") + helm := New(clientset, version, namespace) if err := helm.Setup(); err != nil { fmt.Println("setting up Helm failed with err: ", err) os.Exit(1) diff --git a/infrastructure/cli/pkg/kube/BUILD b/infrastructure/cli/pkg/kube/BUILD new file mode 100644 index 0000000000..83766acd3c --- /dev/null +++ b/infrastructure/cli/pkg/kube/BUILD @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "kube", + srcs = ["context.go"], + importpath = "cli/pkg/kube", + visibility = ["//visibility:public"], + deps = [ + "@io_k8s_client_go//kubernetes:go_default_library", + "@io_k8s_client_go//tools/clientcmd:go_default_library", + ], +) diff --git a/infrastructure/cli/pkg/kube/context.go b/infrastructure/cli/pkg/kube/context.go new file mode 100644 index 0000000000..d34e95b645 --- /dev/null +++ b/infrastructure/cli/pkg/kube/context.go @@ -0,0 +1,41 @@ +package kube + +import ( + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" +) + +type KubeCtx struct { + kubeConfigPath string + contextName string +} + +func New(kubeConfigPath, contextName string) KubeCtx { + return KubeCtx{ + kubeConfigPath: kubeConfigPath, + contextName: contextName, + } +} + +func (c *KubeCtx) GetClientSet() (*kubernetes.Clientset, error) { + if c.contextName == "" { + config, err := clientcmd.BuildConfigFromFlags("", c.kubeConfigPath) + if err != nil { + return nil, err + } + + return kubernetes.NewForConfig(config) + } + + file, err := clientcmd.LoadFromFile(c.kubeConfigPath) + if err != nil { + return nil, err + } + + config, err := clientcmd.NewNonInteractiveClientConfig(*file, c.contextName, nil, nil).ClientConfig() + if err != nil { + return nil, err + } + + return kubernetes.NewForConfig(config) +} diff --git a/infrastructure/cli/pkg/providers/BUILD b/infrastructure/cli/pkg/providers/BUILD index 09d2919cfe..8688306a1d 100644 --- a/infrastructure/cli/pkg/providers/BUILD +++ b/infrastructure/cli/pkg/providers/BUILD @@ -2,13 +2,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "providers", - srcs = ["providers.go"], + srcs = ["provider.go"], importpath = "cli/pkg/providers", visibility = ["//visibility:public"], deps = [ + "//infrastructure/cli/pkg/kube", "//infrastructure/cli/pkg/providers/aws", "//infrastructure/cli/pkg/providers/minikube", - "@io_k8s_client_go//kubernetes:go_default_library", - "@io_k8s_client_go//tools/clientcmd:go_default_library", ], ) diff --git a/infrastructure/cli/pkg/providers/aws/BUILD b/infrastructure/cli/pkg/providers/aws/BUILD index 75f022eea6..330aa9d1d9 100644 --- a/infrastructure/cli/pkg/providers/aws/BUILD +++ b/infrastructure/cli/pkg/providers/aws/BUILD @@ -5,5 +5,5 @@ go_library( srcs = ["aws.go"], importpath = "cli/pkg/providers/aws", visibility = ["//visibility:public"], - deps = ["@io_k8s_client_go//kubernetes:go_default_library"], + deps = ["//infrastructure/cli/pkg/kube"], ) diff --git a/infrastructure/cli/pkg/providers/aws/aws.go b/infrastructure/cli/pkg/providers/aws/aws.go index b60256cf2a..f84b3651b8 100644 --- a/infrastructure/cli/pkg/providers/aws/aws.go +++ b/infrastructure/cli/pkg/providers/aws/aws.go @@ -1,14 +1,18 @@ package aws import ( + "cli/pkg/kube" "fmt" - "k8s.io/client-go/kubernetes" "os" ) +type Aws struct { +} -func Create() (*kubernetes.Clientset, error) { - fmt.Println("aws provider not yet implemented") +func (a *Aws) Provision() (kube.KubeCtx, error) { + // Use this to + //clientcmd.NewNonInteractiveClientConfig() + fmt.Println("minikube provider not yet implemented") os.Exit(1) - return nil, nil + return kube.KubeCtx{}, nil } diff --git a/infrastructure/cli/pkg/providers/minikube/BUILD b/infrastructure/cli/pkg/providers/minikube/BUILD index 3ccc7114a4..01610760f0 100644 --- a/infrastructure/cli/pkg/providers/minikube/BUILD +++ b/infrastructure/cli/pkg/providers/minikube/BUILD @@ -5,5 +5,5 @@ go_library( srcs = ["minikube.go"], importpath = "cli/pkg/providers/minikube", visibility = ["//visibility:public"], - deps = ["@io_k8s_client_go//kubernetes:go_default_library"], + deps = ["//infrastructure/cli/pkg/kube"], ) diff --git a/infrastructure/cli/pkg/providers/minikube/minikube.go b/infrastructure/cli/pkg/providers/minikube/minikube.go index 23aa78f563..5ae35e8700 100644 --- a/infrastructure/cli/pkg/providers/minikube/minikube.go +++ b/infrastructure/cli/pkg/providers/minikube/minikube.go @@ -1,14 +1,20 @@ package minikube import ( + "cli/pkg/kube" "fmt" - "k8s.io/client-go/kubernetes" "os" ) -func Create() (*kubernetes.Clientset, error) { +type Minikube struct { +} + +func (m *Minikube) Provision() (kube.KubeCtx, error) { + // Use this to + //clientcmd.NewNonInteractiveClientConfig() fmt.Println("minikube provider not yet implemented") os.Exit(1) - return nil, nil + return kube.KubeCtx{}, nil } + diff --git a/infrastructure/cli/pkg/providers/provider.go b/infrastructure/cli/pkg/providers/provider.go new file mode 100644 index 0000000000..e87d5e3c47 --- /dev/null +++ b/infrastructure/cli/pkg/providers/provider.go @@ -0,0 +1,46 @@ +package providers + +import ( + "cli/pkg/kube" + "cli/pkg/providers/aws" + "cli/pkg/providers/minikube" + "fmt" + "os" +) + +type ProviderName string + +const ( + Local ProviderName = "local" + Minikube ProviderName = "minikube" + Aws ProviderName = "aws" +) + +type Provider interface { + Provision() (kube.KubeCtx, error) +} + +func MustGet(providerName ProviderName) Provider { + if providerName == Minikube { + return &minikube.Minikube{} + } + + if providerName == Aws { + return &aws.Aws{} + } + + // TODO remove this provider in #1041 + if providerName == Local { + return &LocalProvider{} + } + + panic(fmt.Sprintf("unknown provider \"%v\"", providerName)) +} + +// TODO remove this provider in #1041 +type LocalProvider struct { +} + +func (l *LocalProvider) Provision() (kube.KubeCtx, error) { + return kube.New(os.Getenv("KUBE_CONFIG_PATH"), ""), nil +} diff --git a/infrastructure/cli/pkg/providers/providers.go b/infrastructure/cli/pkg/providers/providers.go deleted file mode 100644 index 02f1cfe632..0000000000 --- a/infrastructure/cli/pkg/providers/providers.go +++ /dev/null @@ -1,41 +0,0 @@ -package providers - -import ( - "cli/pkg/providers/aws" - "cli/pkg/providers/minikube" - "fmt" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "os" -) - -type Provider string - -const ( - Local Provider = "local" - Minikube Provider = "minikube" - Aws Provider = "aws" -) - -func GetProvider(providerName Provider) (*kubernetes.Clientset, error) { - if providerName == Minikube { - return minikube.Create() - } - - if providerName == Aws { - return aws.Create() - } - - // TODO remove this provider in #1041 - if providerName == Local { - config, err := clientcmd.BuildConfigFromFlags("", os.Getenv("KUBE_CONFIG_PATH")) - if err != nil { - fmt.Println("Building kubeconfig failed with error: ", err) - os.Exit(1) - } - - return kubernetes.NewForConfig(config) - } - - return nil, fmt.Errorf("unknown provider \"%v\"", providerName) -} From efba03b275c40792dbde7dec02f6c53a04d09bd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 08:45:57 +0100 Subject: [PATCH 34/43] Bump react from 16.12.0 to 16.14.0 (#1167) Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.12.0 to 16.14.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.14.0/packages/react) Signed-off-by: dependabot[bot] <support@github.com> 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 7aeeeceecd..ffb928f488 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "linkifyjs": "^2.1.9", "lodash-es": "^4.17.21", "preact": "^10.5.12", - "react": "16.12.0", + "react": "16.14.0", "react-dom": "16.12.0", "react-facebook-login": "^4.1.1", "react-markdown": "^5.0.3", diff --git a/yarn.lock b/yarn.lock index bea1df6bc9..385528918c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7701,10 +7701,10 @@ react-window@1.8.5: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -react@16.12.0: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz" - integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA== +react@16.14.0: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" + integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" From 63b8b88b820a81ed9f9149aed300da7ab4879318 Mon Sep 17 00:00:00 2001 From: Christoph Proeschel <proeschel.christoph@gmail.com> Date: Tue, 9 Mar 2021 09:19:07 +0100 Subject: [PATCH 35/43] [#1165] Fix template endpoint content field (#1166) --- BUILD | 2 +- WORKSPACE | 4 +- .../core/api/admin/TemplatesController.java | 9 +-- .../payload/CreateTemplateRequestPayload.java | 2 +- .../payload/UpdateTemplateRequestPayload.java | 2 +- .../api/admin/TemplatesControllerTest.java | 10 +-- docs/docs/api/endpoints/templates.md | 78 ++++++++++++------- 7 files changed, 63 insertions(+), 44 deletions(-) diff --git a/BUILD b/BUILD index 4004fa804c..c4b6f3cdba 100644 --- a/BUILD +++ b/BUILD @@ -15,7 +15,7 @@ alias( fix_prettier( name = "fix_prettier", - ignore = ":.prettierignore", + ignore = "//:.prettierignore", ) multirun( diff --git a/WORKSPACE b/WORKSPACE index 2537290e54..1017cc10fc 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,9 +9,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") # Airy Bazel tools git_repository( name = "com_github_airyhq_bazel_tools", - commit = "67692d45534663c18ad5d1061f367fab23a98415", + commit = "9cf55cc0a42d68f0198883b04493ce7c7b3113ed", remote = "https://github.com/airyhq/bazel-tools.git", - shallow_since = "1614184856 +0100", + shallow_since = "1614958086 +0100", ) load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps") diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java index aabc6604ba..dbb2e3eb86 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/TemplatesController.java @@ -27,11 +27,10 @@ @RestController public class TemplatesController { private final Stores stores; - private final ObjectMapper objectMapper; + private final ObjectMapper objectMapper = new ObjectMapper(); - public TemplatesController(Stores stores, ObjectMapper objectMapper) { + public TemplatesController(Stores stores) { this.stores = stores; - this.objectMapper = objectMapper; } @PostMapping("/templates.create") @@ -39,7 +38,7 @@ ResponseEntity<?> createTemplate(@RequestBody @Valid CreateTemplateRequestPayloa final Template template = Template.newBuilder() .setId(UUID.randomUUID().toString()) .setName(payload.getName()) - .setContent(payload.getContent()) + .setContent(objectMapper.writeValueAsString(payload.getContent())) .setVariables(objectMapper.writeValueAsString(payload.getVariables())) .build(); @@ -100,7 +99,7 @@ ResponseEntity<?> updateTemplate(@RequestBody @Valid UpdateTemplateRequestPayloa } if (payload.getContent() != null) { - template.setContent(payload.getContent()); + template.setContent(objectMapper.writeValueAsString(payload.getContent())); } if (payload.getVariables() != null) { diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/CreateTemplateRequestPayload.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/CreateTemplateRequestPayload.java index 2baf16be26..2c462fb27f 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/CreateTemplateRequestPayload.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/CreateTemplateRequestPayload.java @@ -15,7 +15,7 @@ public class CreateTemplateRequestPayload { @NotNull private String name; @NotNull - private String content; + private JsonNode content; @Valid @NotNull private JsonNode variables; diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java index 50c7bbf856..a5e52e4dbc 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/payload/UpdateTemplateRequestPayload.java @@ -16,6 +16,6 @@ public class UpdateTemplateRequestPayload { @NotNull private UUID id; private String name; - private String content; + private JsonNode content; private JsonNode variables; } diff --git a/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java b/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java index 2aeafdb4b5..30763d2eca 100644 --- a/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java +++ b/backend/api/admin/src/test/java/co/airy/core/api/admin/TemplatesControllerTest.java @@ -78,8 +78,8 @@ void beforeEach() throws Exception { @Test void canManageTemplates() throws Exception { final String name = "awesome-template"; - final String content = "{\\\"blueprint\\\":\\\"text\\\",\\\"payload\\\":\\\"[[salutation]]!\\\"}"; - final String payload = "{\"name\":\"" + name + "\",\"content\": \"" + content + "\", \"variables\": { \"en\": {\"salutation\": \"Hello\"}}}"; + final String content = "{\"blueprint\":\"text\",\"payload\":\"[[salutation]]!\"}"; + final String payload = "{\"name\":\"" + name + "\",\"content\":" + content + ",\"variables\": { \"en\": {\"salutation\": \"Hello\"}}}"; final String createTagResponse = webTestHelper.post("/templates.create", payload, "user-id") .andExpect(status().isCreated()) @@ -98,7 +98,7 @@ void canManageTemplates() throws Exception { webTestHelper.post("/templates.info", "{\"id\":\"" + templateId + "\"}", "user-id") .andExpect(status().isOk()) .andExpect(jsonPath("$.id").value(is(templateId))) - .andExpect(jsonPath("$.content").value(is("{\"blueprint\":\"text\",\"payload\":\"[[salutation]]!\"}"))) + .andExpect(jsonPath("$.content").value(is(content))) .andExpect(jsonPath("$.variables.en.salutation").value(is("Hello"))) .andExpect(jsonPath("$.name").value(is(name))); @@ -108,10 +108,10 @@ void canManageTemplates() throws Exception { .andExpect(jsonPath("$.data[0].id").value(is(templateId))) .andExpect(jsonPath("$.data[0].name").value(is(name))); - webTestHelper.post("/templates.update", "{\"id\":\"" + templateId + "\", \"name\": \"new-template-name\", \"content\": \"" + content + "\"}", "user-id") + webTestHelper.post("/templates.update", "{\"id\":\"" + templateId + "\", \"name\": \"new-template-name\", \"content\": " + content + "}", "user-id") .andExpect(status().isOk()) .andExpect(jsonPath("$.id").value(is(templateId))) - .andExpect(jsonPath("$.content").value(is("{\"blueprint\":\"text\",\"payload\":\"[[salutation]]!\"}"))) + .andExpect(jsonPath("$.content").value(is(content))) .andExpect(jsonPath("$.variables.en.salutation").value(is("Hello"))) .andExpect(jsonPath("$.name").value(is("new-template-name"))); diff --git a/docs/docs/api/endpoints/templates.md b/docs/docs/api/endpoints/templates.md index 83205b6962..01a72ffc90 100644 --- a/docs/docs/api/endpoints/templates.md +++ b/docs/docs/api/endpoints/templates.md @@ -12,13 +12,18 @@ for more information. **Sample request** -```json +```json5 { - "name": "my template name", - "content": "{\"blueprint\":\"text\",\"payload\":\"[[salutation]]!\"}", - "variables": { - "en": { - "salutation": "%s" + name: "my template name", + content: { + message: { + text: "[[salutation]]!" + } + }, + // source specific message content + variables: { + en: { + salutation: "%s" } } } @@ -28,7 +33,7 @@ for more information. ```json5 { - "id": "TEMPLATE-UUID" + id: "TEMPLATE-UUID" } ``` @@ -46,7 +51,7 @@ Find templates whose name contains "NASA": ```json5 { - "name": "NASA" //optional + name: "NASA" // optional } ``` @@ -54,14 +59,19 @@ Find templates whose name contains "NASA": ```json5 { - "data": [ + data: [ { - "id": "TEMPLATE-UUID", - "name": "Template for NASA", - "content": '{"blueprint":"text","payload":"[[salutation]]!"}', - "variables": { - "en": { - "salutation": "%s" + id: "TEMPLATE-UUID", + name: "Template for NASA", + content: { + message: { + text: "[[salutation]]!" + } + }, + // source specific message content + variables: { + en: { + salutation: "%s" } } } @@ -75,7 +85,7 @@ Find templates whose name contains "NASA": ```json5 { - "id": "TEMPLATE-UUID" + id: "TEMPLATE-UUID" } ``` @@ -83,12 +93,17 @@ Find templates whose name contains "NASA": ```json5 { - "id": "TEMPLATE-UUID", - "name": "{String}", - "content": "{String}", - "variables": { - "en": { - "salutation": "%s" + id: "TEMPLATE-UUID", + name: "{String}", + content: { + message: { + text: "[[salutation]]!" + } + }, + // source specific message content + variables: { + en: { + salutation: "%s" } } } @@ -100,12 +115,17 @@ Find templates whose name contains "NASA": ```json5 { - "id": "template id", - "name": "my template name", - "content": '{"blueprint":"text","payload":"[[salutation]]!"}', - "variables": { - "en": { - "salutation": "%s" + id: "template id", + name: "my template name", + content: { + message: { + text: "[[salutation]]!" + } + }, + // source specific message content + variables: { + en: { + salutation: "%s" } } } @@ -121,7 +141,7 @@ This endpoint returns _200_ if successful. ```json5 { - "id": "TEMPLATE-UUID" + id: "TEMPLATE-UUID" } ``` From 3b39beec4d3a1a645ba298e495a7fe619bd6982a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:38:31 +0100 Subject: [PATCH 36/43] Bump webpack-dev-middleware from 3.7.2 to 4.1.0 (#1154) Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 3.7.2 to 4.1.0. - [Release notes](https://github.com/webpack/webpack-dev-middleware/releases) - [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v3.7.2...v4.1.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 84 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index ffb928f488..3c61ca16e0 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "webpack": "^4.43.0", "webpack-bundle-analyzer": "^4.4.0", "webpack-cli": "^3.3.11", - "webpack-dev-middleware": "^3.7.2", + "webpack-dev-middleware": "^4.1.0", "webpack-hot-middleware": "^2.25.0" } } diff --git a/yarn.lock b/yarn.lock index 385528918c..587d60e6ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3263,6 +3263,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -4712,6 +4717,11 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-monkey@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.1.tgz#4a82f36944365e619f4454d9fff106553067b781" + integrity sha512-fcSa+wyTqZa46iWweI7/ZiUfegOZl0SG8+dltIwFXo7+zYU9J9kpS3NB6pZcSlJdhvIwp81Adx2XhZorncxiaA== + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz" @@ -6151,7 +6161,7 @@ make-dir@^3.0.2: dependencies: semver "^6.0.0" -map-age-cleaner@^0.1.1: +map-age-cleaner@^0.1.1, map-age-cleaner@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz" integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== @@ -6236,6 +6246,21 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +mem@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-8.0.0.tgz#b5e4b6d2d241c6296da05436173b4d0c7ae1f9ac" + integrity sha512-qrcJOe6uD+EW8Wrci1Vdiua/15Xw3n/QnaNXE7varnB6InxSk7nu3/i5jfy3S6kWxr8WYJ6R1o0afMUtvorTsA== + dependencies: + map-age-cleaner "^0.1.3" + mimic-fn "^3.1.0" + +memfs@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.2.0.tgz#f9438e622b5acd1daa8a4ae160c496fdd1325b26" + integrity sha512-f/xxz2TpdKv6uDn6GtHee8ivFyxwxmPuXatBb1FBwxYNuVpbM3k/Y1Z+vC0mH/dIXXrukYfe3qe5J32Dfjg93A== + dependencies: + fs-monkey "1.0.1" + "memoize-one@>=3.1.1 <6": version "5.1.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz" @@ -6345,29 +6370,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== - -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.46.0: + version "1.46.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" + integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.28, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.29" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" + integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== dependencies: - mime-db "1.43.0" - -mime-types@^2.1.27, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" + mime-db "1.46.0" mime@1.6.0: version "1.6.0" @@ -6379,11 +6392,6 @@ mime@^2.3.1: resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz" integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag== -mime@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -6394,6 +6402,11 @@ mimic-fn@^2.0.0, mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" + integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz" @@ -9499,16 +9512,17 @@ webpack-cli@^3.3.11: v8-compile-cache "2.0.3" yargs "13.2.4" -webpack-dev-middleware@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz" - integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== +webpack-dev-middleware@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-4.1.0.tgz#f0c1f12ff4cd855b3b5eec89ee0f69bcc5336364" + integrity sha512-mpa/FY+DiBu5+r5JUIyTCYWRfkWgyA3/OOE9lwfzV9S70A4vJYLsVRKj5rMFEsezBroy2FmPyQ8oBRVW8QmK1A== dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" + colorette "^1.2.1" + mem "^8.0.0" + memfs "^3.2.0" + mime-types "^2.1.28" range-parser "^1.2.1" - webpack-log "^2.0.0" + schema-utils "^3.0.0" webpack-hot-middleware@^2.25.0: version "2.25.0" From a98cf9ce28713f5a38729c141a488879758e5058 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:39:21 +0100 Subject: [PATCH 37/43] Bump html-webpack-plugin from 4.2.0 to 4.5.2 (#1168) Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 4.2.0 to 4.5.2. - [Release notes](https://github.com/jantimon/html-webpack-plugin/releases) - [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/v4.5.2/CHANGELOG.md) - [Commits](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.0...v4.5.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3c61ca16e0..009b656da3 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "eslint-plugin-react": "^7.22.0", "express": "^4.17.1", "file-loader": "^6.2.0", - "html-webpack-plugin": "^4.2.0", + "html-webpack-plugin": "^4.5.2", "minimist": "^1.2.5", "node-sass": "^4.14.0", "prettier": "^2.2.1", diff --git a/yarn.lock b/yarn.lock index 587d60e6ab..1a50ec3c9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5170,17 +5170,17 @@ html-to-react@^1.3.4: lodash.camelcase "^4.3.0" ramda "^0.27.1" -html-webpack-plugin@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.2.0.tgz" - integrity sha512-zL7LYTuq/fcJX6vV6tmmvFR508Bd9e6kvVGbS76YAjZ2CPVRzsjkvDYs/SshPevpolSdTWgaDV39D6k6oQoVFw== +html-webpack-plugin@^4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz#76fc83fa1a0f12dd5f7da0404a54e2699666bc12" + integrity sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A== dependencies: "@types/html-minifier-terser" "^5.0.0" "@types/tapable" "^1.0.5" "@types/webpack" "^4.41.8" html-minifier-terser "^5.0.1" loader-utils "^1.2.3" - lodash "^4.17.15" + lodash "^4.17.20" pretty-error "^2.1.1" tapable "^1.1.3" util.promisify "1.0.0" From b3388a4bb7b853e1edbc2b0f74318ef36db40e0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:40:16 +0100 Subject: [PATCH 38/43] Bump terser-webpack-plugin from 2.3.6 to 4.2.3 (#1169) Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 2.3.6 to 4.2.3. - [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/v2.3.6...v4.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 177 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 113 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 009b656da3..ad9bf1bd50 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "reselect": "4.0.0", "sass-loader": "^8.0.2", "style-loader": "^1.1.4", - "terser-webpack-plugin": "^2.3.6", + "terser-webpack-plugin": "^4.2.3", "typescript": "3.7.4", "url-loader": "^4.1.1", "webpack": "^4.43.0", diff --git a/yarn.lock b/yarn.lock index 1a50ec3c9b..fc5b2d3729 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1675,6 +1675,14 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@polka/url@^1.0.0-next.9": version "1.0.0-next.11" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz" @@ -2901,28 +2909,27 @@ cacache@^12.0.2, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^13.0.1: - version "13.0.1" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz" - integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w== +cacache@^15.0.5: + version "15.0.5" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0" + integrity sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A== dependencies: - chownr "^1.1.2" - figgy-pudding "^3.5.1" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" fs-minipass "^2.0.0" glob "^7.1.4" - graceful-fs "^4.2.2" infer-owner "^1.0.4" - lru-cache "^5.1.1" - minipass "^3.0.0" + lru-cache "^6.0.0" + minipass "^3.1.1" minipass-collect "^1.0.2" minipass-flush "^1.0.5" minipass-pipeline "^1.2.2" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - p-map "^3.0.0" + mkdirp "^1.0.3" + p-map "^4.0.0" promise-inflight "^1.0.1" - rimraf "^2.7.1" - ssri "^7.0.0" + rimraf "^3.0.2" + ssri "^8.0.0" + tar "^6.0.2" unique-filename "^1.1.1" cache-base@^1.0.1: @@ -3100,11 +3107,16 @@ chokidar@^3.4.0: optionalDependencies: fsevents "~2.1.2" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz" @@ -4986,11 +4998,6 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== -graceful-fs@^4.2.2: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz" @@ -5731,11 +5738,12 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -jest-worker@^25.4.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz" - integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== +jest-worker@^26.5.0: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: + "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" @@ -6491,6 +6499,14 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz" @@ -6537,6 +6553,11 @@ mkdirp@^0.5.1: dependencies: minimist "0.0.8" +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + moment@^2.29.1: version "2.29.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" @@ -6986,20 +7007,20 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== -p-limit@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz" - integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== - dependencies: - p-try "^2.0.0" - -p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.3.0: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz" @@ -7019,10 +7040,10 @@ p-map@^2.0.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" @@ -8124,7 +8145,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: +rimraf@2, rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -8230,7 +8251,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.6.6: +schema-utils@^2.6.1, schema-utils@^2.6.5: version "2.6.6" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz" integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== @@ -8311,11 +8332,6 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -serialize-javascript@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz" - integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== - serialize-javascript@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.1.0.tgz" @@ -8323,6 +8339,13 @@ serialize-javascript@^3.1.0: dependencies: randombytes "^2.1.0" +serialize-javascript@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz" @@ -8525,6 +8548,14 @@ source-map-support@~0.5.12: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@~0.5.19: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz" @@ -8547,7 +8578,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: +source-map@^0.7.3, source-map@~0.7.2: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -8612,12 +8643,11 @@ ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -ssri@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.1.0.tgz" - integrity sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g== +ssri@^8.0.0: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== dependencies: - figgy-pudding "^3.5.1" minipass "^3.1.1" stable@^0.1.8: @@ -8922,6 +8952,18 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" +tar@^6.0.2: + version "6.1.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" + integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terser-webpack-plugin@^1.4.3: version "1.4.4" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz" @@ -8937,19 +8979,19 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser-webpack-plugin@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz" - integrity sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg== +terser-webpack-plugin@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz#28daef4a83bd17c1db0297070adc07fc8cfc6a9a" + integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ== dependencies: - cacache "^13.0.1" + cacache "^15.0.5" find-cache-dir "^3.3.1" - jest-worker "^25.4.0" - p-limit "^2.3.0" - schema-utils "^2.6.6" - serialize-javascript "^3.0.0" + jest-worker "^26.5.0" + p-limit "^3.0.2" + schema-utils "^3.0.0" + serialize-javascript "^5.0.1" source-map "^0.6.1" - terser "^4.6.12" + terser "^5.3.4" webpack-sources "^1.4.3" terser@^4.1.2, terser@^4.6.3: @@ -8961,14 +9003,14 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.6.12: - version "4.6.12" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.12.tgz" - integrity sha512-fnIwuaKjFPANG6MAixC/k1TDtnl1YlPLUlLVIxxGZUn1gfUx2+l3/zGNB72wya+lgsb50QBi2tUV75RiODwnww== +terser@^5.3.4: + version "5.6.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.6.0.tgz#138cdf21c5e3100b1b3ddfddf720962f88badcd2" + integrity sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA== dependencies: commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" + source-map "~0.7.2" + source-map-support "~0.5.19" text-table@^0.2.0: version "0.2.0" @@ -9750,3 +9792,8 @@ yauzl@^2.10.0: dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From b4b42dd5093f6ddd447d75ed9bed6cd77ea5076e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:40:35 +0100 Subject: [PATCH 39/43] Bump elliptic from 6.5.3 to 6.5.4 (#1171) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/yarn.lock b/yarn.lock index fc5b2d3729..f442dfb8e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2714,10 +2714,10 @@ bluebird@^3.5.5, bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== body-parser@1.19.0: version "1.19.0" @@ -2771,9 +2771,9 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= browserify-aes@^1.0.0, browserify-aes@^1.0.4: @@ -3992,17 +3992,17 @@ elegant-spinner@^1.0.1: integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= elliptic@^6.0.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emoji-mart@^3.0.0: version "3.0.0" @@ -5098,7 +5098,7 @@ hash-base@^3.0.0: hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: inherits "^2.0.3" @@ -5121,9 +5121,9 @@ history@^4.9.0: tiny-warning "^1.0.0" value-equal "^1.0.1" -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= dependencies: hash.js "^1.0.3" @@ -5360,7 +5360,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -6441,12 +6441,12 @@ mini-create-react-context@^0.4.0: minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= minimatch@^3.0.4, minimatch@~3.0.2: From e82f2446a981f691ea556218ca04deb168b6c84d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:40:50 +0100 Subject: [PATCH 40/43] Bump elliptic from 6.5.3 to 6.5.4 in /docs (#1170) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index bc5f6e5ccf..4cd523da0d 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2682,10 +2682,10 @@ bluebird@^3.5.5, bluebird@^3.7.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.1: version "5.1.3" @@ -2770,7 +2770,7 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -4261,17 +4261,17 @@ electron-to-chromium@^1.3.649: integrity sha512-j6pRuNylFBbroG6NB8Lw/Im9oDY74s2zWHBP5TmdYg73cBuL6cz//SMgolVa0gIJk/DSL+kO7baJ1DSXW1FUZg== elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" @@ -5361,7 +5361,7 @@ history@^4.9.0: tiny-warning "^1.0.0" value-equal "^1.0.1" -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -6848,7 +6848,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= From d61ce1f0e3691cd94e7fadeab79a9d9029690ec1 Mon Sep 17 00:00:00 2001 From: Bodo Tasche <bitboxer@users.noreply.github.com> Date: Tue, 9 Mar 2021 10:10:57 +0100 Subject: [PATCH 41/43] Revert "Bump webpack-dev-middleware from 3.7.2 to 4.1.0 (#1154)" (#1172) This reverts commit 3b39beec4d3a1a645ba298e495a7fe619bd6982a. --- package.json | 2 +- yarn.lock | 84 ++++++++++++++++++++++------------------------------ 2 files changed, 36 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index ad9bf1bd50..607d6061cc 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "webpack": "^4.43.0", "webpack-bundle-analyzer": "^4.4.0", "webpack-cli": "^3.3.11", - "webpack-dev-middleware": "^4.1.0", + "webpack-dev-middleware": "^3.7.2", "webpack-hot-middleware": "^2.25.0" } } diff --git a/yarn.lock b/yarn.lock index f442dfb8e9..0299d9398c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3275,11 +3275,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== - colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -4729,11 +4724,6 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" -fs-monkey@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.1.tgz#4a82f36944365e619f4454d9fff106553067b781" - integrity sha512-fcSa+wyTqZa46iWweI7/ZiUfegOZl0SG8+dltIwFXo7+zYU9J9kpS3NB6pZcSlJdhvIwp81Adx2XhZorncxiaA== - fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz" @@ -6169,7 +6159,7 @@ make-dir@^3.0.2: dependencies: semver "^6.0.0" -map-age-cleaner@^0.1.1, map-age-cleaner@^0.1.3: +map-age-cleaner@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz" integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== @@ -6254,21 +6244,6 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -mem@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-8.0.0.tgz#b5e4b6d2d241c6296da05436173b4d0c7ae1f9ac" - integrity sha512-qrcJOe6uD+EW8Wrci1Vdiua/15Xw3n/QnaNXE7varnB6InxSk7nu3/i5jfy3S6kWxr8WYJ6R1o0afMUtvorTsA== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^3.1.0" - -memfs@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.2.0.tgz#f9438e622b5acd1daa8a4ae160c496fdd1325b26" - integrity sha512-f/xxz2TpdKv6uDn6GtHee8ivFyxwxmPuXatBb1FBwxYNuVpbM3k/Y1Z+vC0mH/dIXXrukYfe3qe5J32Dfjg93A== - dependencies: - fs-monkey "1.0.1" - "memoize-one@>=3.1.1 <6": version "5.1.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz" @@ -6378,17 +6353,29 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" - integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.28, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.29" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" - integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== dependencies: - mime-db "1.46.0" + mime-db "1.43.0" + +mime-types@^2.1.27, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" mime@1.6.0: version "1.6.0" @@ -6400,6 +6387,11 @@ mime@^2.3.1: resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz" integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag== +mime@^2.4.4: + version "2.4.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz" + integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -6410,11 +6402,6 @@ mimic-fn@^2.0.0, mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" - integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== - min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz" @@ -9554,17 +9541,16 @@ webpack-cli@^3.3.11: v8-compile-cache "2.0.3" yargs "13.2.4" -webpack-dev-middleware@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-4.1.0.tgz#f0c1f12ff4cd855b3b5eec89ee0f69bcc5336364" - integrity sha512-mpa/FY+DiBu5+r5JUIyTCYWRfkWgyA3/OOE9lwfzV9S70A4vJYLsVRKj5rMFEsezBroy2FmPyQ8oBRVW8QmK1A== +webpack-dev-middleware@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz" + integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== dependencies: - colorette "^1.2.1" - mem "^8.0.0" - memfs "^3.2.0" - mime-types "^2.1.28" + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" range-parser "^1.2.1" - schema-utils "^3.0.0" + webpack-log "^2.0.0" webpack-hot-middleware@^2.25.0: version "2.25.0" From cd95997916a84d7cf3560e6f352640dbb31566f8 Mon Sep 17 00:00:00 2001 From: Paulo Diniz <paulo.rc.diniz@gmail.com> Date: Tue, 9 Mar 2021 11:22:25 +0100 Subject: [PATCH 42/43] Fixes #1178 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1f60af7134..ac454c6a1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.0-alpha +0.12.0 From fcb8717381ebbf14d5da7a9ea2c29e0707eea66b Mon Sep 17 00:00:00 2001 From: Pascal Holy <pascal@airy.co> Date: Tue, 9 Mar 2021 12:07:25 +0100 Subject: [PATCH 43/43] Enabled ngrok by default --- infrastructure/defaults.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/infrastructure/defaults.yaml b/infrastructure/defaults.yaml index 41416beb6e..401498d44c 100644 --- a/infrastructure/defaults.yaml +++ b/infrastructure/defaults.yaml @@ -2,3 +2,4 @@ global: appImageTag: develop containerRegistry: ghcr.io/airyhq namespace: default + ngrokEnabled: true