-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): Test and deploy to Production v8.13.1 (#10617)
Signed-off-by: Matt Krick <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com> Co-authored-by: Matt Krick <[email protected]> Co-authored-by: Terry Acker <[email protected]> Co-authored-by: Bruce Tian <[email protected]> Co-authored-by: Nick O'Ferrall <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Georg Bremer <[email protected]> Co-authored-by: snyk-bot <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Rafa <[email protected]> Co-authored-by: Dale Bumblis <[email protected]> Co-authored-by: Sven Seeberg <[email protected]> Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
ab3dac6
commit f6ea5e4
Showing
64 changed files
with
3,715 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "8.13.0" | ||
".": "8.13.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"description": "An open-source app for building smarter, more agile teams.", | ||
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)", | ||
"license": "AGPL-3.0", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ParabolInc/parabol" | ||
|
@@ -69,7 +69,8 @@ | |
"git-url-parse": "12.0.0", | ||
"fbjs": "^3.0.0", | ||
"parse-url": "^8.1.0", | ||
"recursive-readdir": "^2.2.3" | ||
"recursive-readdir": "^2.2.3", | ||
"axios": "^1.7.8" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.20.12", | ||
|
@@ -117,7 +118,7 @@ | |
"prettier-plugin-organize-imports": "^4.0.0", | ||
"prettier-plugin-tailwindcss": "^0.5.13", | ||
"raw-loader": "^4.0.2", | ||
"relay-compiler": "^18.0.0", | ||
"relay-compiler": "^18.2.0", | ||
"relay-config": "^12.0.1", | ||
"sucrase": "^3.35.0", | ||
"tailwindcss": "^3.2.7", | ||
|
@@ -127,12 +128,13 @@ | |
"typescript-eslint": "^8.3.0", | ||
"vscode-apollo-relay": "^1.5.0", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "4.9.1", | ||
"webpack-cli": "5.1.4", | ||
"workbox-webpack-plugin": "^6.5.4", | ||
"yargs": "^17.7.2", | ||
"yarn-deduplicate": "^3.1.0" | ||
}, | ||
"dependencies": { | ||
"@module-federation/enhanced": "^0.7.6", | ||
"dotenv": "8.0.0", | ||
"dotenv-expand": "5.1.0", | ||
"lodash.toarray": "^4.4.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "chronos", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"description": "A cron job scheduler", | ||
"author": "Matt Krick <[email protected]>", | ||
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/chronos#readme", | ||
|
@@ -25,6 +25,6 @@ | |
}, | ||
"dependencies": { | ||
"cron": "^2.3.1", | ||
"parabol-server": "8.13.0" | ||
"parabol-server": "8.13.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"description": "An open-source app for building smarter, more agile teams.", | ||
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)", | ||
"license": "AGPL-3.0", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ParabolInc/parabol" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "parabol-embedder", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"description": "A service that computes embedding vectors from Parabol objects", | ||
"author": "Jordan Husney <[email protected]>", | ||
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/embedder#readme", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "gql-executor", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"description": "A Stateless GraphQL Executor", | ||
"author": "Matt Krick <[email protected]>", | ||
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/gqlExecutor#readme", | ||
|
@@ -25,8 +25,8 @@ | |
}, | ||
"dependencies": { | ||
"dd-trace": "^5.0.0", | ||
"parabol-client": "8.13.0", | ||
"parabol-server": "8.13.0", | ||
"parabol-client": "8.13.1", | ||
"parabol-server": "8.13.1", | ||
"undici": "^5.26.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "integration-tests", | ||
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)", | ||
"license": "AGPL-3.0", | ||
"version": "8.13.0", | ||
"version": "8.13.1", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__generated__/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import {Variables} from 'react-relay' | ||
import { | ||
Environment, | ||
Network, | ||
Observable, | ||
RecordSource, | ||
RelayFeatureFlags, | ||
RelayFieldLogger, | ||
RequestParameters | ||
} from 'relay-runtime' | ||
import RelayModernStore from 'relay-runtime/lib/store/RelayModernStore' | ||
|
||
import {AnyAction, Store} from '@reduxjs/toolkit' | ||
import {Client4} from 'mattermost-redux/client' | ||
import {GlobalState} from 'mattermost-redux/types/store' | ||
RelayFeatureFlags.ENABLE_RELAY_RESOLVERS = true | ||
|
||
type State = { | ||
authToken: string | null | ||
serverUrl: string | ||
store: Store<GlobalState, AnyAction> | ||
} | ||
|
||
const fetchFunction = (state: State) => (params: RequestParameters, variables: Variables) => { | ||
const {serverUrl, authToken} = state | ||
const response = fetch( | ||
serverUrl, | ||
Client4.getOptions({ | ||
method: 'POST', | ||
headers: { | ||
accept: 'application/json', | ||
'content-type': 'application/json', | ||
'x-application-authorization': authToken ? `Bearer ${authToken}` : '' | ||
}, | ||
body: JSON.stringify({ | ||
type: 'start', | ||
payload: { | ||
documentId: params.id, | ||
query: params.text, | ||
variables | ||
} | ||
}) | ||
}) | ||
) | ||
|
||
return Observable.from( | ||
response.then(async (data) => { | ||
const json = await data.json() | ||
return json.payload | ||
}) | ||
) | ||
} | ||
|
||
const relayFieldLogger: RelayFieldLogger = (event) => { | ||
if (event.kind === 'relay_resolver.error') { | ||
console.warn(`Resolver error encountered in ${event.owner}.${event.fieldPath}`) | ||
console.warn(event.error) | ||
} | ||
} | ||
|
||
export type ResolverContext = { | ||
serverUrl: string | ||
store: Store<GlobalState, AnyAction> | ||
} | ||
|
||
export class Atmosphere extends Environment { | ||
state: State | ||
|
||
constructor(serverUrl: string, reduxStore: Store<GlobalState, AnyAction>) { | ||
const state = { | ||
serverUrl: serverUrl + '/graphql', | ||
store: reduxStore, | ||
authToken: null | ||
} | ||
|
||
const network = Network.create(fetchFunction(state)) | ||
const relayStore = new RelayModernStore(new RecordSource(), { | ||
resolverContext: { | ||
store: reduxStore, | ||
serverUrl | ||
} | ||
}) | ||
super({ | ||
store: relayStore, | ||
network, | ||
relayFieldLogger | ||
}) | ||
this.state = state | ||
} | ||
} | ||
|
||
/** | ||
* Creates a new Relay environment instance for managing (fetching, storing) GraphQL data. | ||
*/ | ||
export function createEnvironment(serverUrl: string, reduxStore: Store<GlobalState, AnyAction>) { | ||
return new Atmosphere(serverUrl, reduxStore) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import {Client4} from 'mattermost-redux/client' | ||
import {ReactNode, useCallback, useEffect} from 'react' | ||
import {useSelector} from 'react-redux' | ||
import {RelayEnvironmentProvider} from 'react-relay' | ||
import {Atmosphere} from './Atmosphere' | ||
import {getPluginServerRoute} from './selectors' | ||
|
||
type Props = { | ||
environment: Atmosphere | ||
children: ReactNode | ||
} | ||
|
||
export default function AtmosphereProvider({environment, children}: Props) { | ||
const pluginServerRoute = useSelector(getPluginServerRoute) | ||
const serverUrl = `${pluginServerRoute}/login` | ||
const login = useCallback(async () => { | ||
const response = await fetch( | ||
serverUrl, | ||
Client4.getOptions({ | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
} | ||
}) | ||
) | ||
const body = await response.json() | ||
environment.state.authToken = body.authToken | ||
}, [serverUrl]) | ||
|
||
useEffect(() => { | ||
if (!environment.state.authToken) { | ||
login() | ||
} | ||
}, [environment.state.authToken, login]) | ||
|
||
if (!environment.state.authToken) { | ||
return null | ||
} | ||
|
||
return <RelayEnvironmentProvider environment={environment}>{children}</RelayEnvironmentProvider> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# `Mattermost Plugin` | ||
|
||
The Mattermost plugin itself lives in [ParabolInc/parabol-mattermost-plugin](https://github.com/ParabolInc/parabol-mattermost-plugin). | ||
It needs to be installed to the Mattermost server and configured to point to the Parabol instance. | ||
It then loads the code in this package via Webpacks module federation. | ||
|
116 changes: 116 additions & 0 deletions
116
packages/mattermost-plugin/components/LinkTeamModal/LinkTeamModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import graphql from 'babel-plugin-relay/macro' | ||
import React, {useEffect} from 'react' | ||
import {Modal} from 'react-bootstrap' | ||
import {useDispatch, useSelector} from 'react-redux' | ||
|
||
import {useLazyLoadQuery} from 'react-relay' | ||
import {LinkTeamModalQuery} from '../../__generated__/LinkTeamModalQuery.graphql' | ||
import {useConfig} from '../../hooks/useConfig' | ||
import {useCurrentChannel} from '../../hooks/useCurrentChannel' | ||
import {useLinkTeam} from '../../hooks/useLinkTeam' | ||
import {closeLinkTeamModal} from '../../reducers' | ||
import {getAssetsUrl, isLinkTeamModalVisible} from '../../selectors' | ||
import Select from '../Select' | ||
|
||
const LinkTeamModal = () => { | ||
const isVisible = useSelector(isLinkTeamModalVisible) | ||
const channel = useCurrentChannel() | ||
const config = useConfig() | ||
const data = useLazyLoadQuery<LinkTeamModalQuery>( | ||
graphql` | ||
query LinkTeamModalQuery($channel: ID!) { | ||
viewer { | ||
linkedTeamIds(channel: $channel) | ||
teams { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
`, | ||
{ | ||
channel: channel.id | ||
} | ||
) | ||
const viewer = data.viewer | ||
const unlinkedTeams = viewer.teams.filter((team) => !viewer.linkedTeamIds?.includes(team.id)) | ||
const linkTeam = useLinkTeam() | ||
|
||
const [selectedTeam, setSelectedTeam] = React.useState<(typeof data.viewer.teams)[number]>() | ||
|
||
useEffect(() => { | ||
if (!selectedTeam && unlinkedTeams && unlinkedTeams.length > 0) { | ||
setSelectedTeam(unlinkedTeams[0]) | ||
} | ||
}, [unlinkedTeams, selectedTeam]) | ||
|
||
const dispatch = useDispatch() | ||
|
||
const handleClose = () => { | ||
dispatch(closeLinkTeamModal()) | ||
} | ||
|
||
const handleLink = async () => { | ||
if (!selectedTeam) { | ||
return | ||
} | ||
await linkTeam(selectedTeam.id) | ||
handleClose() | ||
} | ||
|
||
const assetsPath = useSelector(getAssetsUrl) | ||
|
||
if (!isVisible) { | ||
return null | ||
} | ||
|
||
return ( | ||
<Modal | ||
dialogClassName='modal--scroll' | ||
show={true} | ||
onHide={handleClose} | ||
onExited={handleClose} | ||
bsSize='large' | ||
backdrop='static' | ||
> | ||
<Modal.Header closeButton={true}> | ||
<Modal.Title> | ||
<img width={36} height={36} src={`${assetsPath}/parabol.png`} /> | ||
{` Link a Parabol Team to ${channel.name}`} | ||
</Modal.Title> | ||
</Modal.Header> | ||
<Modal.Body> | ||
{unlinkedTeams && unlinkedTeams.length > 0 ? ( | ||
<> | ||
<Select | ||
label='Choose Parabol Team' | ||
required={true} | ||
value={selectedTeam} | ||
options={unlinkedTeams} | ||
onChange={setSelectedTeam} | ||
/> | ||
</> | ||
) : ( | ||
<> | ||
<div> | ||
<p> | ||
All your teams are already linked to this channel. Visit{' '} | ||
<a href={`${config?.parabolUrl}/newteam/`}>Parabol</a> to create new teams. | ||
</p> | ||
</div> | ||
</> | ||
)} | ||
</Modal.Body> | ||
<Modal.Footer> | ||
<button className='btn btn-tertiary cancel-button' onClick={handleClose}> | ||
Cancel | ||
</button> | ||
<button className='btn btn-primary save-button' onClick={handleLink}> | ||
Link Team | ||
</button> | ||
</Modal.Footer> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default LinkTeamModal |
Oops, something went wrong.