Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 21edec9

Browse files
committed
Merge branch 'main' of github.com:codiga/electron-app
2 parents 57d63dc + 88ac315 commit 21edec9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+216
-299
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
'@typescript-eslint/no-non-null-assertion': 'off',
1212
'react/require-default-props': [2, { functions: 'defaultArguments' }],
1313
'import/prefer-default-export': 'off',
14+
'@typescript-eslint/ban-ts-comment': 'off',
1415
},
1516
parserOptions: {
1617
ecmaVersion: 2020,

.github/FUNDING.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/1-Bug_report.md

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/2-Question.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/3-Feature_request.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/config.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/stale.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build/release
1+
name: Build and Release
22

33
on: push
44

@@ -21,7 +21,9 @@ jobs:
2121
- name: Install packages
2222
run: npm install
2323
- name: Run tests
24-
run: npm test
24+
run: npm run build && npm test
25+
- name: Build the Electron App
26+
run: npm run package
2527
- name: Build/release Electron app
2628
uses: samuelmeuli/action-electron-builder@v1
2729
with:

.github/workflows/test.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Test, Lint and Package
22

33
on: [push, pull_request]
44

@@ -15,20 +15,14 @@ jobs:
1515
uses: actions/checkout@v1
1616

1717
- name: Install Node.js and NPM
18-
uses: actions/setup-node@v2
18+
uses: actions/setup-node@v1
1919
with:
20-
node-version: 16
21-
cache: npm
22-
23-
- name: npm install
24-
run: |
25-
npm install
26-
27-
- name: npm test
28-
env:
29-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: |
31-
npm run package
32-
npm run lint
33-
npm exec tsc
34-
npm test
20+
node-version: 14
21+
- name: Install Packages
22+
run: npm install
23+
- name: Build and Test
24+
run: npm run build && npm test
25+
- name: Lint
26+
run: npm run lint
27+
- name: Package
28+
run: npm run package

package-lock.json

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"apollo-link-debounce": "^3.0.0",
112112
"bootstrap": "^5.1.3",
113113
"buffer": "^6.0.3",
114+
"cross-fetch": "^3.1.5",
114115
"electron-debug": "^3.2.0",
115116
"electron-log": "^4.4.8",
116117
"electron-store": "^8.1.0",

src/__tests__/App.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '@testing-library/jest-dom';
2+
import { render } from '@testing-library/react';
3+
import App from '../renderer/App';
4+
5+
describe('App', () => {
6+
it('should render', () => {
7+
expect(render(<App />)).toBeTruthy();
8+
});
9+
});

src/renderer/components/CookbookTable/CookbookTable.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import {
1818
Logos,
1919
} from '@codiga/codiga-components';
2020

21-
import { getCookbookUrl, getGroupUrl } from 'renderer/utils/urlUtils';
22-
import { getAvatarUrl } from 'renderer/utils/userUtils';
23-
import { AssistantCookbook } from 'renderer/types/assistantTypes';
24-
import { PageTypes } from 'renderer/types/pageTypes';
25-
import FavoriteCookbook from 'renderer/components/Favorite/FavoriteCookbook';
26-
import UserLink from 'renderer/components/UserLink';
21+
import { getCookbookUrl, getGroupUrl } from '../../utils/urlUtils';
22+
import { getAvatarUrl } from '../../utils/userUtils';
23+
import { AssistantCookbook } from '../../types/assistantTypes';
24+
import { PageTypes } from '../../types/pageTypes';
25+
import FavoriteCookbook from '../Favorite/FavoriteCookbook';
26+
import UserLink from '../UserLink';
2727
import VotesCurrent from '../VotesCurrent';
2828

2929
const Td = (props: TableCellProps) => (

src/renderer/components/CookbookTable/CookbookTableEmpty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link } from '@chakra-ui/react';
22
import { EmptyState } from '@codiga/codiga-components';
3-
import { APP_URL } from 'renderer/lib/config';
3+
import { APP_URL } from '../../lib/config';
44

55
export default function CookbookTableEmpty() {
66
return (

src/renderer/components/CookbookTable/CookbookTableEmptyFiltered.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button, Flex, Link } from '@chakra-ui/react';
22
import { EmptyState } from '@codiga/codiga-components';
3-
import { APP_URL } from 'renderer/lib/config';
3+
import { APP_URL } from '../../lib/config';
44
import { useFilters } from '../FiltersContext';
55

66
export default function CookbookTableEmptyFiltereed() {

src/renderer/components/CookbookTable/CookbookTableError.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link } from '@chakra-ui/react';
22
import { EmptyState } from '@codiga/codiga-components';
3-
import { APP_URL } from 'renderer/lib/config';
3+
import { APP_URL } from '../../lib/config';
44

55
export default function CookbookTableError() {
66
return (

src/renderer/components/Favorite/Favorite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button, Tooltip } from '@chakra-ui/react';
22
import { HeartFilledIcon, HeartIcon } from '@codiga/codiga-components';
3-
import { useUser } from 'renderer/components/UserContext';
3+
import { useUser } from '../UserContext';
44

55
export type FavoriteProps = {
66
isSubscribed?: boolean;

src/renderer/components/Favorite/FavoriteCookbook.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import { useToast } from '@codiga/codiga-components';
33
import {
44
SUBSCRIBE_TO_COOKBOOK,
55
UNSUBSCRIBE_TO_COOKBOOK,
6-
} from 'renderer/graphql/mutations';
6+
} from '../../graphql/mutations';
77
import {
88
GET_SHARED_COOKBOOKS,
99
GET_USER_COOKBOOKS,
1010
GET_USER_SUBSCRIBED_COOKBOOKS,
11-
} from 'renderer/graphql/queries';
11+
} from '../../graphql/queries';
1212
import {
1313
GET_SHARED_COOKBOOKS_VARIABLES,
1414
GET_USER_COOKBOOKS_VARIABLES,
1515
GET_USER_SUBSCRIBED_COOKBOOKS_VARIABLES,
16-
} from 'renderer/graphql/variables';
16+
} from '../../graphql/variables';
1717
import Favorite, { FavoriteProps } from './Favorite';
1818

1919
type FavoriteCookbookProps = Pick<FavoriteProps, 'isSubscribed'> & {

src/renderer/components/Favorite/FavoriteSnippet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import { useToast } from '@codiga/codiga-components';
33
import {
44
SUBSCRIBE_TO_RECIPE,
55
UNSUBSCRIBE_TO_RECIPE,
6-
} from 'renderer/graphql/mutations';
6+
} from '../../graphql/mutations';
77
import {
88
GET_RECIPES_SEMANTICALLY,
99
GET_SHARED_RECIPES,
1010
GET_USER_RECIPES,
1111
GET_USER_SUBSCRIBED_RECIPES,
12-
} from 'renderer/graphql/queries';
12+
} from '../../graphql/queries';
1313
import {
1414
GET_SHARED_RECIPES_VARIABLES,
1515
GET_USER_RECIPES_VARIABLES,
1616
GET_USER_SUBSCRIBED_RECIPES_VARIABLES,
17-
} from 'renderer/graphql/variables';
17+
} from '../../graphql/variables';
1818
import Favorite, { FavoriteProps } from './Favorite';
1919

2020
type FavoriteRecipeProps = Pick<FavoriteProps, 'isSubscribed'> & {

src/renderer/components/Filters/Filters.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import {
1717
LanguageSelector,
1818
LibrarySelector,
1919
} from '@codiga/codiga-components';
20-
import { useFilters } from 'renderer/components/FiltersContext';
21-
import { ALL_LANGUAGES } from 'renderer/lib/constants';
20+
import { useFilters } from '../FiltersContext';
21+
import { ALL_LANGUAGES } from '../../lib/constants';
2222
import {
2323
LanguageEnumeration,
2424
LibraryEnumeration,
25-
} from 'renderer/types/assistantTypes';
25+
} from '../../types/assistantTypes';
2626

2727
export default function Filters() {
2828
const { isOpen, onToggle } = useDisclosure();

src/renderer/components/Filters/filterBy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FilterTypes } from 'renderer/components/FiltersContext';
2-
import { Language } from 'renderer/lib/constants';
3-
import { AssistantRecipeDependencyConstraint } from 'renderer/types/assistantTypes';
1+
import { FilterTypes } from '../FiltersContext';
2+
import { Language } from '../../lib/constants';
3+
import { AssistantRecipeDependencyConstraint } from '../../types/assistantTypes';
44

55
const filterByName = (
66
filters: FilterTypes,

src/renderer/components/FiltersContext/FiltersContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { createContext, useContext, useState, ReactNode } from 'react';
2-
import { Language } from 'renderer/lib/constants';
2+
import { Language } from '../../lib/constants';
33
import {
44
LanguageEnumeration,
55
LibraryEnumeration,
6-
} from 'renderer/types/assistantTypes';
6+
} from '../../types/assistantTypes';
77

88
export type SearchTermType = string;
99
export type LanguageType = LanguageEnumeration;

0 commit comments

Comments
 (0)