Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show import errors in the client, and handle the import of shared types across applications better #73

Merged
merged 19 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b1e0794
fix: attempting to fix linting
TheNickOfTime Jul 20, 2024
c60e0d7
feat: adding workspace vscode settings
TheNickOfTime Jul 22, 2024
03db78b
fix: disabling 'noEmit' tsconfig property to get proper typescript er…
TheNickOfTime Jul 22, 2024
8892033
feat: removing eslint config for now to avoid multiple linting errors…
TheNickOfTime Jul 22, 2024
d45b099
feat: adding types tsconfig
TheNickOfTime Jul 22, 2024
736e1c0
feat: adding types project reference in the client
TheNickOfTime Jul 22, 2024
1747dfd
feat: converting types files to modules
TheNickOfTime Jul 23, 2024
5dfe85b
feat: moving types into src & addressing type references
TheNickOfTime Jul 23, 2024
f3f2ad0
feat: moving server files into src & using type project reference
TheNickOfTime Jul 23, 2024
a0bc2ef
feat: ignoring temp directories
TheNickOfTime Jul 23, 2024
1b0ca6c
feat: removing preset lookups from types to the client for now
TheNickOfTime Jul 23, 2024
7b1df16
fix: type import references in the client
TheNickOfTime Jul 23, 2024
a6429be
fix: updating preset lookup imports
TheNickOfTime Jul 23, 2024
49bd714
fix: updating type path reference
TheNickOfTime Jul 23, 2024
6322413
fix: reverting type files back from being declaration modules
TheNickOfTime Jul 23, 2024
815de62
fix: setup vite to resolve path aliases
TheNickOfTime Jul 23, 2024
7db2834
feat: switching worker off ts-node and nodemon in favor of tsx
TheNickOfTime Jul 23, 2024
e4d7f74
fix: run dev command points at the moved server file
TheNickOfTime Jul 23, 2024
2f74710
chore: removing unnecessary comments
TheNickOfTime Jul 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/video/

build/
temp/
node_modules/

.env
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"editor.rulers": [100],
"editor.tabSize": 4,
"typescript.locale": "en",
"typescript.preferences.useAliasesForRenames": false,
"typescript.validate.enable": true
}
16 changes: 0 additions & 16 deletions client/.eslintrc.cjs

This file was deleted.

95 changes: 37 additions & 58 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,29 @@
"url": "https://git.goodforyou.games/ncunningham/handbrake-web.git"
},
"dependencies": {
"@fontsource/inter": "^5.0.18",
"@fontsource/inter": "^5.0.19",
"@fontsource/noto-sans": "^5.0.22",
"bootstrap-icons": "^1.11.3",
"dotenv": "^16.4.5",
"mime": "^4.0.3",
"mime": "^4.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"react-router-dom": "^6.25.1",
"socket.io-client": "^4.7.5"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.10",
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.2.22",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"sass": "^1.77.2",
"sass": "^1.77.8",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.2.2",
"vite": "^5.3.2",
"vite": "^5.3.4",
"vite-tsconfig-paths": "^4.3.2"
}
}
4 changes: 2 additions & 2 deletions client/src/components/base/inputs/path/path-input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { FileBrowserMode } from 'types/file-browser.types';
import { DirectoryItemType } from 'types/directory.types';
import { FileBrowserMode } from 'types/file-browser';
import { DirectoryItemType } from 'types/directory';
import FileBrowser from 'components/modules/file-browser/file-browser';
import './path-input.scss';

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/cards/preset-card/preset-card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { HandbrakePresetDataType } from 'types/preset.types';
import { HandbrakePresetDataType } from 'types/preset';
import ButtonInput from 'components/base/inputs/button/button-input';
import PresetCardSummary from './tabs/summary/preset-card-summary';
import PresetCardDimensions from './tabs/dimensions/preset-card-dimensions';
Expand Down
51 changes: 51 additions & 0 deletions client/src/components/cards/preset-card/preset-lookups.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
export const AudioEncoderLookup: { [index: string]: string } = {
copy: 'Auto Passthru',
'copy:aac': 'AAC Passthru',
'copy:ac3': 'AC3 Passthru',
'copy:eac3': 'E-AC3 Passthru',
'copy:truehd': 'TrueHD Passthru',
'copy:dts': 'DTS Passthru',
'copy:dtshd': 'DTS-HD Passthru',
'copy:mp2': 'MP2 Passthru',
'copy:mp3': 'MP3 Passthru',
'copy:flac': 'FLAC Passthru',
'copy:opus': 'Opus Passthru',
ac3: 'AC3',
av_aac: 'AAC (avcodec)',
eac3: 'E-AC3',
};

export const FilterLookup: { [index: string]: string } = {
off: 'Off',
none: 'None',
default: 'Default',
custom: 'Custom',
ultralight: 'Ultralight',
light: 'Light',
medium: 'Medium',
strong: 'Strong',
stronger: 'Stronger',
verystrong: 'Very Strong',
ultrafine: 'Ultrafine',
fine: 'Fine',
coarse: 'Coarse',
verycoarse: 'Very Coarse',
tiny: 'Tiny',
small: 'Small',
large: 'Large',
wide: 'Wide',
verywide: 'Very Wide',
yadif: 'Yadif',
decomb: 'Decomb',
'skip-spatial': 'Skip Spatial Check',
bob: 'Bob',
nlmeans: 'NLMeans',
eedi2: 'EEDI2',
eedi2bob: 'EEDI2 Bob',
unsharp: 'UnSharp',
lapsharp: 'LapSharp',
bt2020: 'BT.2020',
bt709: 'BT.709',
'bt601-6-525': 'BT.601 SMPTE-C',
'bt601-6-625': 'BT.601 EBU',
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AudioEncoderLookup } from '../../preset-lookups';
import { HandbrakePresetDataType } from 'types/preset';
import TextInfo from 'components/base/info/text-info/text-info';
import { AudioEncoderLookup, HandbrakePresetDataType } from 'types/preset.types';
import './preset-card-audio.scss';

type Params = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TextInfo from 'components/base/info/text-info/text-info';
import { HandbrakePresetDataType } from 'types/preset.types';
import { HandbrakePresetDataType } from 'types/preset';

type Params = {
preset: HandbrakePresetDataType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TextInfo from 'components/base/info/text-info/text-info';
import { HandbrakePresetDataType, PictureCropMode } from 'types/preset.types';
import { HandbrakePresetDataType, PictureCropMode } from 'types/preset';
import './preset-card-dimensions.scss';

type Params = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FilterLookup, HandbrakePresetDataType } from 'types/preset.types';
import './preset-card-filters.scss';
import { FilterLookup } from '../../preset-lookups';
import { HandbrakePresetDataType } from 'types/preset';
import TextInfo from 'components/base/info/text-info/text-info';
import './preset-card-filters.scss';

type Params = {
preset: HandbrakePresetDataType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TextInfo from 'components/base/info/text-info/text-info';
import { HandbrakePresetDataType } from 'types/preset.types';
import { HandbrakePresetDataType } from 'types/preset';
import './preset-card-subtitles.scss';

type Params = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import TextInfo from 'components/base/info/text-info/text-info';
import { AudioEncoderLookup, HandbrakePresetDataType } from 'types/preset.types';
import { AudioEncoderLookup } from '../../preset-lookups';
import { HandbrakePresetDataType } from 'types/preset';
import './preset-card-summary.scss';

type Params = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TextInfo from 'components/base/info/text-info/text-info';
import { HandbrakePresetDataType, VideoQualityType } from 'types/preset.types';
import { HandbrakePresetDataType, VideoQualityType } from 'types/preset';
import './preset-card-video.scss';

type Params = {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/cards/watcher-card/watcher-card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WatcherDefinitionWithIDType } from 'types/watcher.types';
import { WatcherDefinitionWithIDType } from 'types/watcher';
import ButtonInput from 'components/base/inputs/button/button-input';
import './watcher-card.scss';
import TextInfo from 'components/base/info/text-info/text-info';
Expand Down
Loading