-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maint 782 migrate from cra to vite (#840)
* pushing * fix: converted from jest to vitest * chore: changed env variables * fix: workflow * chore: update build script * fix: add recording * fix: set env to staging * feat: add record with record key secret env * fix: build steph * fix: workflow yaml * chore: remove unnecessary dependencie
- Loading branch information
Showing
92 changed files
with
15,389 additions
and
38,595 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
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,8 +1,8 @@ | ||
REACT_APP_AUTH0_DOMAIN=dev-mui7zm42.us.auth0.com | ||
REACT_APP_AUTH0_CLIENT_ID=YOUR_NEUROSTORE_API_AUTH0_CLIENT_ID | ||
REACT_APP_AUTH0_CLIENT_SECRET=YOUR_AUTH0_CLIENT_SECRET | ||
REACT_APP_AUTH0_AUDIENCE=localhost | ||
REACT_APP_NEUROSTORE_API_DOMAIN=http://localhost/api | ||
REACT_APP_NEUROSYNTH_API_DOMAIN=http://localhost:81/api | ||
REACT_APP_ENV=DEV | ||
REACT_APP_PUBMED_API_KEY=YOUR_PUBMED_KEY | ||
VITE_APP_AUTH0_DOMAIN=dev-mui7zm42.us.auth0.com | ||
VITE_APP_AUTH0_CLIENT_ID=YOUR_NEUROSTORE_API_AUTH0_CLIENT_ID | ||
VITE_APP_AUTH0_CLIENT_SECRET=YOUR_AUTH0_CLIENT_SECRET | ||
VITE_APP_AUTH0_AUDIENCE=localhost | ||
VITE_APP_NEUROSTORE_API_DOMAIN=http://localhost/api | ||
VITE_APP_NEUROSYNTH_API_DOMAIN=http://localhost:81/api | ||
VITE_APP_ENV=DEV | ||
VITE_APP_PUBMED_API_KEY=YOUR_PUBMED_KEY |
16 changes: 16 additions & 0 deletions
16
compose/neurosynth-frontend/__mocks__/@auth0/auth0-react.ts
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,16 @@ | ||
import { vi } from 'vitest'; | ||
|
||
const useAuth0 = vi.fn().mockReturnValue({ | ||
getAccessTokenSilently: vi.fn().mockImplementation(() => { | ||
return Promise.resolve('test-token'); | ||
}), | ||
loginWithPopup: vi.fn(), | ||
logout: vi.fn(), | ||
isAuthenticated: false, | ||
isLoading: false, | ||
user: { | ||
sub: 'some-github-user', | ||
}, | ||
}); | ||
|
||
export { useAuth0 }; |
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,7 @@ | ||
import { vi } from 'vitest'; | ||
|
||
const useSnackbar = vi.fn().mockReturnValue({ | ||
enqueueSnackbar: vi.fn(), | ||
}); | ||
|
||
export { useSnackbar }; |
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,13 @@ | ||
import { vi } from 'vitest'; | ||
|
||
const useQueryClient = vi.fn().mockReturnValue({ | ||
invalidateQueries: vi.fn(), | ||
}); | ||
|
||
const useQuery = vi.fn().mockReturnValue({ | ||
data: null, | ||
isLoading: false, | ||
isError: false, | ||
}); | ||
|
||
export { useQueryClient, useQuery }; |
7 changes: 4 additions & 3 deletions
7
...ontend/src/__mocks__/react-router-dom.tsx → ...h-frontend/__mocks__/react-router-dom.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
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 |
---|---|---|
|
@@ -24,11 +24,11 @@ export default defineConfig({ | |
env: { | ||
auth0Username: '[email protected]', | ||
auth0Password: 'password', | ||
auth0ClientId: process.env.REACT_APP_AUTH0_CLIENT_ID, | ||
auth0ClientSecret: process.env.REACT_APP_AUTH0_CLIENT_SECRET, | ||
auth0Domain: process.env.REACT_APP_AUTH0_DOMAIN, | ||
auth0Audience: process.env.REACT_APP_AUTH0_AUDIENCE, | ||
neurostoreAPIBaseURL: process.env.REACT_APP_NEUROSTORE_API_DOMAIN, | ||
neurosynthAPIBaseURL: process.env.REACT_APP_NEUROSYNTH_API_DOMAIN, | ||
auth0ClientId: process.env.VITE_APP_AUTH0_CLIENT_ID, | ||
auth0ClientSecret: process.env.VITE_APP_AUTH0_CLIENT_SECRET, | ||
auth0Domain: process.env.VITE_APP_AUTH0_DOMAIN, | ||
auth0Audience: process.env.VITE_APP_AUTH0_AUDIENCE, | ||
neurostoreAPIBaseURL: process.env.VITE_APP_NEUROSTORE_API_DOMAIN, | ||
neurosynthAPIBaseURL: process.env.VITE_APP_NEUROSYNTH_API_DOMAIN, | ||
}, | ||
}); |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.