cleanup: restructued project folders

Signed-off-by: Raul Kele <raulkeleblk@gmail.com>

Signed-off-by: Raul Kele <raulkeleblk@gmail.com>
This commit is contained in:
Raul Kele 2023-02-02 13:24:52 +02:00
parent 514475a33f
commit 9ecfcf1665
50 changed files with 102 additions and 102 deletions

View File

@ -1,7 +1,7 @@
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { api } from 'api';
import Explore from 'components/Explore';
import Explore from 'components/Explore/Explore';
import React from 'react';
import { createSearchParams, MemoryRouter } from 'react-router-dom';
import filterConstants from 'utilities/filterConstants.js';

View File

@ -4,7 +4,7 @@ import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
jest.mock(
'components/Explore',
'components/Explore/Explore',
() =>
function Explore() {
return <div />;

View File

@ -1,5 +1,5 @@
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import FilterCard from 'components/FilterCard';
import FilterCard from 'components/Shared/FilterCard';
import React, { useState } from 'react';
import filterConstants from 'utilities/filterConstants';

View File

@ -1,6 +1,6 @@
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import Home from 'components/Home';
import Home from 'components/Home/Home';
import React from 'react';
import { createSearchParams } from 'react-router-dom';
import { sortByCriteria } from 'utilities/sortCriteria';

View File

@ -4,7 +4,7 @@ import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
jest.mock(
'components/Home',
'components/Home/Home',
() =>
function Home() {
return <div />;

View File

@ -1,6 +1,6 @@
import { render, waitFor, screen, fireEvent } from '@testing-library/react';
import React from 'react';
import SignIn from 'components/SignIn';
import SignIn from 'components/Login/SignIn';
import { api } from '../../api';
import userEvent from '@testing-library/user-event';

View File

@ -1,5 +1,5 @@
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import RepoDetails from 'components/RepoDetails';
import RepoDetails from 'components/Repo/RepoDetails';
import React from 'react';
import { api } from 'api';
import { createSearchParams } from 'react-router-dom';

View File

@ -13,7 +13,7 @@ jest.mock('react-router-dom', () => ({
}));
jest.mock(
'components/RepoDetails',
'components/Repo/RepoDetails',
() =>
function RepoDetails() {
return <div />;

View File

@ -1,6 +1,6 @@
import { fireEvent, waitFor, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Tags from 'components/Tags';
import Tags from 'components/Repo/Tabs/Tags';
import React from 'react';
const mockedUsedNavigate = jest.fn();

View File

@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import userEvent from '@testing-library/user-event';
import PreviewCard from 'components/PreviewCard';
import PreviewCard from 'components/Shared/PreviewCard';
// usenavigate mock
const mockedUsedNavigate = jest.fn();

View File

@ -1,7 +1,7 @@
import { render, screen, fireEvent } from '@testing-library/react';
import React from 'react';
import userEvent from '@testing-library/user-event';
import RepoCard from 'components/RepoCard';
import RepoCard from 'components/Shared/RepoCard';
import { createSearchParams } from 'react-router-dom';
// usenavigate mock

View File

@ -1,7 +1,7 @@
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { api } from 'api';
import SearchSuggestion from 'components/SearchSuggestion';
import SearchSuggestion from 'components/Header/SearchSuggestion';
import { MemoryRouter } from 'react-router-dom';
import React from 'react';

View File

@ -1,6 +1,6 @@
import { render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import DependsOn from 'components/DependsOn';
import DependsOn from 'components/Tag/Tabs/DependsOn';
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

View File

@ -1,6 +1,6 @@
import { render, screen, waitFor, fireEvent } from '@testing-library/react';
import { api } from 'api';
import HistoryLayers from 'components/HistoryLayers';
import HistoryLayers from 'components/Tag/Tabs/HistoryLayers';
import React from 'react';
const mockLayersList = [

View File

@ -1,6 +1,6 @@
import { render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import IsDependentOn from 'components/IsDependentOn';
import IsDependentOn from 'components/Tag/Tabs/IsDependentOn';
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

View File

@ -1,7 +1,7 @@
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { api } from 'api';
import ReferredBy from 'components/ReferredBy';
import ReferredBy from 'components/Tag/Tabs/ReferredBy';
import React from 'react';
const mockReferrersList = {

View File

@ -2,7 +2,7 @@ import React from 'react';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { api } from 'api';
import TagDetails from 'components/TagDetails';
import TagDetails from 'components/Tag/TagDetails';
import MockThemeProvier from '__mocks__/MockThemeProvider';
const TagDetailsThemeWrapper = () => {

View File

@ -9,7 +9,7 @@ afterEach(() => {
});
jest.mock(
'components/TagDetails',
'components/Tag/TagDetails',
() =>
function TagDetails() {
return <div />;
@ -17,7 +17,7 @@ jest.mock(
);
jest.mock(
'components/ExploreHeader',
'components/Header/ExploreHeader',
() =>
function ExploreHeader() {
return <div />;

View File

@ -1,6 +1,6 @@
import { render, screen, waitFor, fireEvent } from '@testing-library/react';
import { api } from 'api';
import VulnerabilitiesDetails from 'components/VulnerabilitiesDetails';
import VulnerabilitiesDetails from 'components/Tag/Tabs/VulnerabilitiesDetails';
import React from 'react';
import { MemoryRouter } from 'react-router-dom';

View File

@ -2,8 +2,8 @@
import React, { useEffect, useMemo, useRef, useState } from 'react';
// components
import RepoCard from './RepoCard.jsx';
import Loading from './Loading';
import RepoCard from '../Shared/RepoCard.jsx';
import Loading from '../Shared/Loading';
import Typography from '@mui/material/Typography';
import Sticky from 'react-sticky-el';
import Alert from '@mui/material/Alert';
@ -12,11 +12,11 @@ import { Container, FormControl, Grid, InputLabel, MenuItem, Select, Stack, Butt
import makeStyles from '@mui/styles/makeStyles';
// utility
import { api, endpoints } from '../api';
import { host } from '../host';
import { api, endpoints } from '../../api';
import { host } from '../../host';
import { mapToRepo } from 'utilities/objectModels.js';
import { useSearchParams } from 'react-router-dom';
import FilterCard from './FilterCard.jsx';
import FilterCard from '../Shared/FilterCard.jsx';
import { isEmpty } from 'lodash';
import filterConstants from 'utilities/filterConstants.js';
import { sortByCriteria } from 'utilities/sortCriteria.js';

View File

@ -7,8 +7,8 @@ import { AppBar, Toolbar, Stack, Grid } from '@mui/material';
// styling
import makeStyles from '@mui/styles/makeStyles';
import logo from '../assets/zotLogo.svg';
import logoxs from '../assets/zotLogoSmall.png';
import logo from '../../assets/zotLogo.svg';
import logoxs from '../../assets/zotLogoSmall.png';
import { useState, useEffect } from 'react';
import SearchSuggestion from './SearchSuggestion';

View File

@ -1,11 +1,11 @@
import { Stack, Typography } from '@mui/material';
import { makeStyles } from '@mui/styles';
import { api, endpoints } from 'api';
import { host } from '../host';
import { host } from '../../host';
import React, { useEffect, useMemo, useState } from 'react';
import RepoCard from './RepoCard';
import RepoCard from '../Shared/RepoCard';
import { mapToRepo } from 'utilities/objectModels';
import Loading from './Loading';
import Loading from '../Shared/Loading';
import { useNavigate, createSearchParams } from 'react-router-dom';
import { sortByCriteria } from 'utilities/sortCriteria';

View File

@ -1,9 +1,9 @@
// react global
import React, { useEffect, useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { host } from '../host';
import { host } from '../../host';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../api';
// components
import Button from '@mui/material/Button';
@ -14,13 +14,13 @@ import Typography from '@mui/material/Typography';
import Alert from '@mui/material/Alert';
import CircularProgress from '@mui/material/CircularProgress';
import TermsOfService from './TermsOfService';
import google from '../assets/Google.png';
import git from '../assets/Git.png';
import google from '../../assets/Google.png';
import git from '../../assets/Git.png';
// styling
import { makeStyles } from '@mui/styles';
import { Card, CardContent } from '@mui/material';
import Loading from './Loading';
import Loading from '../Shared/Loading';
const useStyles = makeStyles(() => ({
cardContainer: {

View File

@ -1,9 +1,9 @@
import { Stack, Typography } from '@mui/material';
import { makeStyles } from '@mui/styles';
import React from 'react';
import logoWhite from '../assets/Zot-white.svg';
import loginDrawing from '../assets/codeReviewSignIn.png';
import backgroundImage from '../assets/backgroundSignIn.png';
import logoWhite from '../../assets/Zot-white.svg';
import loginDrawing from '../../assets/codeReviewSignIn.png';
import backgroundImage from '../../assets/backgroundSignIn.png';
const useStyles = makeStyles(() => ({
container: {

View File

@ -2,24 +2,24 @@
import React, { useEffect, useMemo, useState } from 'react';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../api';
import { useParams, useNavigate, createSearchParams } from 'react-router-dom';
// components
import Tags from './Tags.jsx';
import Tags from './Tabs/Tags.jsx';
import { Box, Card, CardContent, CardMedia, Chip, Grid, Stack, Tab, Typography } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import { host } from '../../host';
// placeholder images
import repocube1 from '../assets/repocube-1.png';
import repocube2 from '../assets/repocube-2.png';
import repocube3 from '../assets/repocube-3.png';
import repocube4 from '../assets/repocube-4.png';
import repocube1 from '../../assets/repocube-1.png';
import repocube2 from '../../assets/repocube-2.png';
import repocube3 from '../../assets/repocube-3.png';
import repocube4 from '../../assets/repocube-4.png';
import { TabContext, TabList, TabPanel } from '@mui/lab';
import RepoDetailsMetadata from './RepoDetailsMetadata';
import Loading from './Loading';
import Loading from '../Shared/Loading';
import { isEmpty } from 'lodash';
import { VulnerabilityIconCheck, SignatureIconCheck } from 'utilities/vulnerabilityAndSignatureCheck';
import { mapToRepoFromRepoInfo } from 'utilities/objectModels';

View File

@ -3,7 +3,7 @@ import makeStyles from '@mui/styles/makeStyles';
import { DateTime } from 'luxon';
import { Markdown } from 'utilities/MarkdowntojsxWrapper';
import React from 'react';
import transform from '../utilities/transform';
import transform from '../../utilities/transform';
const useStyles = makeStyles(() => ({
card: {

View File

@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography';
import { Card, CardContent, Divider, Stack, InputBase, FormControl, Select, InputLabel, MenuItem } from '@mui/material';
import SearchIcon from '@mui/icons-material/Search';
import { makeStyles } from '@mui/styles';
import TagCard from './TagCard';
import TagCard from '../../Shared/TagCard';
import { tagsSortByCriteria } from 'utilities/sortCriteria';
const useStyles = makeStyles(() => ({

View File

@ -1,6 +1,6 @@
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import logo from '../assets/Zot2.svg';
import logo from '../../assets/Zot2.svg';
const useStyles = makeStyles(() => ({
wrapper: {

View File

@ -4,10 +4,10 @@ import React from 'react';
import { useNavigate } from 'react-router-dom';
// placeholder images
import repocube1 from '../assets/repocube-1.png';
import repocube2 from '../assets/repocube-2.png';
import repocube3 from '../assets/repocube-3.png';
import repocube4 from '../assets/repocube-4.png';
import repocube1 from '../../assets/repocube-1.png';
import repocube2 from '../../assets/repocube-2.png';
import repocube3 from '../../assets/repocube-3.png';
import repocube4 from '../../assets/repocube-4.png';
import { isEmpty } from 'lodash';
import { VulnerabilityIconCheck, SignatureIconCheck } from 'utilities/vulnerabilityAndSignatureCheck';

View File

@ -9,10 +9,10 @@ import { Card, CardActionArea, CardMedia, CardContent, Typography, Stack, Chip,
import makeStyles from '@mui/styles/makeStyles';
// placeholder images
import repocube1 from '../assets/repocube-1.png';
import repocube2 from '../assets/repocube-2.png';
import repocube3 from '../assets/repocube-3.png';
import repocube4 from '../assets/repocube-4.png';
import repocube1 from '../../assets/repocube-1.png';
import repocube2 from '../../assets/repocube-2.png';
import repocube3 from '../../assets/repocube-3.png';
import repocube4 from '../../assets/repocube-4.png';
import { VulnerabilityIconCheck, SignatureIconCheck } from 'utilities/vulnerabilityAndSignatureCheck';
import { Markdown } from 'utilities/MarkdowntojsxWrapper';

View File

@ -2,14 +2,14 @@ import React, { useEffect, useState, useMemo, useRef } from 'react';
import { isEmpty } from 'lodash';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../../api';
// components
import { Divider, Typography, Stack } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import Loading from './Loading';
import TagCard from './TagCard';
import { host } from '../../../host';
import Loading from '../../Shared/Loading';
import TagCard from '../../Shared/TagCard';
import { mapToImage } from 'utilities/objectModels';
import { EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants';

View File

@ -1,15 +1,15 @@
import React, { useEffect, useMemo, useState } from 'react';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../../api';
// components
import { Divider, Stack, Typography } from '@mui/material';
import LayerCard from './LayerCard.jsx';
import LayerCard from '../../Shared/LayerCard.jsx';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import { host } from '../../../host';
import { isEmpty } from 'lodash';
import Loading from './Loading';
import Loading from '../../Shared/Loading';
const useStyles = makeStyles(() => ({
card: {

View File

@ -2,14 +2,14 @@ import React, { useEffect, useMemo, useState, useRef } from 'react';
import { isEmpty } from 'lodash';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../../api';
// components
import { Divider, Typography, Stack } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import Loading from './Loading';
import TagCard from './TagCard';
import { host } from '../../../host';
import Loading from '../../Shared/Loading';
import TagCard from '../../Shared/TagCard';
import { mapToImage } from 'utilities/objectModels';
import { EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants';

View File

@ -2,10 +2,10 @@ import React, { useEffect, useState, useMemo } from 'react';
import { makeStyles } from '@mui/styles';
import { isEmpty } from 'lodash';
import { Divider, Typography, Stack } from '@mui/material';
import ReferrerCard from './ReferrerCard';
import Loading from './Loading';
import ReferrerCard from '../../Shared/ReferrerCard';
import Loading from '../../Shared/Loading';
import { api, endpoints } from 'api';
import { host } from '../host';
import { host } from '../../../host';
import { mapReferrer } from 'utilities/objectModels';
const useStyles = makeStyles(() => ({

View File

@ -1,16 +1,16 @@
import React, { useEffect, useMemo, useState, useRef } from 'react';
// utility
import { api, endpoints } from '../api';
import { api, endpoints } from '../../../api';
// components
import Collapse from '@mui/material/Collapse';
import { Box, Card, CardContent, Divider, Stack, Typography } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import { host } from '../../../host';
import { isEmpty } from 'lodash';
import { Link } from 'react-router-dom';
import Loading from './Loading';
import Loading from '../../Shared/Loading';
import { KeyboardArrowDown, KeyboardArrowRight } from '@mui/icons-material';
import { VulnerabilityChipCheck } from 'utilities/vulnerabilityAndSignatureCheck';
import { mapCVEInfo } from 'utilities/objectModels';

View File

@ -2,8 +2,8 @@ import { useParams } from 'react-router-dom';
import React, { useEffect, useMemo, useState, useRef } from 'react';
// utility
import { api, endpoints } from '../api';
import { mapToImage } from '../utilities/objectModels';
import { api, endpoints } from '../../api';
import { mapToImage } from '../../utilities/objectModels';
// components
import {
Box,
@ -23,25 +23,25 @@ import {
} from '@mui/material';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import makeStyles from '@mui/styles/makeStyles';
import { host } from '../host';
import { host } from '../../host';
// placeholder images
import repocube1 from '../assets/repocube-1.png';
import repocube2 from '../assets/repocube-2.png';
import repocube3 from '../assets/repocube-3.png';
import repocube4 from '../assets/repocube-4.png';
import repocube1 from '../../assets/repocube-1.png';
import repocube2 from '../../assets/repocube-2.png';
import repocube3 from '../../assets/repocube-3.png';
import repocube4 from '../../assets/repocube-4.png';
import { TabContext, TabList, TabPanel } from '@mui/lab';
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
import TagDetailsMetadata from './TagDetailsMetadata';
import VulnerabilitiesDetails from './VulnerabilitiesDetails';
import HistoryLayers from './HistoryLayers';
import DependsOn from './DependsOn';
import IsDependentOn from './IsDependentOn';
import VulnerabilitiesDetails from './Tabs/VulnerabilitiesDetails';
import HistoryLayers from './Tabs/HistoryLayers';
import DependsOn from './Tabs/DependsOn';
import IsDependentOn from './Tabs/IsDependentOn';
import { isEmpty } from 'lodash';
import Loading from './Loading';
import Loading from '../Shared/Loading';
import { dockerPull, podmanPull, skopeoPull } from 'utilities/pullStrings';
import { VulnerabilityIconCheck, SignatureIconCheck } from 'utilities/vulnerabilityAndSignatureCheck';
import ReferredBy from './ReferredBy';
import ReferredBy from './Tabs/ReferredBy';
const useStyles = makeStyles((theme) => ({
pageWrapper: {

View File

@ -3,7 +3,7 @@ import makeStyles from '@mui/styles/makeStyles';
import { DateTime } from 'luxon';
import { Markdown } from 'utilities/MarkdowntojsxWrapper';
import React from 'react';
import transform from '../utilities/transform';
import transform from '../../utilities/transform';
const useStyles = makeStyles(() => ({
card: {

View File

@ -1,10 +1,10 @@
// components
import React from 'react';
import Header from '../components/Header.jsx';
import Header from '../components/Header/Header.jsx';
import makeStyles from '@mui/styles/makeStyles';
import { Container, Grid, Stack } from '@mui/material';
import Explore from 'components/Explore.jsx';
import Explore from 'components/Explore/Explore.jsx';
const useStyles = makeStyles(() => ({
container: {

View File

@ -1,10 +1,10 @@
// components
import React from 'react';
import Header from '../components/Header.jsx';
import Header from '../components/Header/Header.jsx';
import makeStyles from '@mui/styles/makeStyles';
import { Container, Grid, Stack } from '@mui/material';
import Home from 'components/Home.jsx';
import Home from 'components/Home/Home.jsx';
const useStyles = makeStyles(() => ({
container: {

View File

@ -2,13 +2,13 @@
import React from 'react';
// components
import SignIn from '../components/SignIn';
import SignIn from '../components/Login/SignIn';
import makeStyles from '@mui/styles/makeStyles';
import { Grid } from '@mui/material';
import SigninPresentation from 'components/SignInPresentation';
import SigninPresentation from 'components/Login/SignInPresentation';
import { useState } from 'react';
import Loading from 'components/Loading';
import Loading from 'components/Shared/Loading';
const useStyles = makeStyles(() => ({
container: {

View File

@ -5,9 +5,9 @@ import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { Container, Grid, Stack } from '@mui/material';
import Header from 'components/Header';
import RepoDetails from 'components/RepoDetails';
import ExploreHeader from 'components/ExploreHeader';
import Header from 'components/Header/Header';
import RepoDetails from 'components/Repo/RepoDetails';
import ExploreHeader from 'components/Header/ExploreHeader';
const useStyles = makeStyles(() => ({
pageWrapper: {

View File

@ -5,9 +5,9 @@ import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { Container, Grid, Stack } from '@mui/material';
import Header from 'components/Header';
import TagDetails from 'components/TagDetails';
import ExploreHeader from 'components/ExploreHeader';
import Header from 'components/Header/Header';
import TagDetails from 'components/Tag/TagDetails';
import ExploreHeader from 'components/Header/ExploreHeader';
const useStyles = makeStyles(() => ({
pageWrapper: {