Skip to content

Commit

Permalink
chore(deps): update project dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Shatford <[email protected]>
  • Loading branch information
jordanshatford committed May 2, 2024
1 parent a34678c commit 2040c5d
Show file tree
Hide file tree
Showing 15 changed files with 510 additions and 445 deletions.
2 changes: 1 addition & 1 deletion apps/api/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"svelte-check": "^3.7.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
Expand Down
8 changes: 4 additions & 4 deletions apps/extension/src/entrypoints/options/App.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { AudioFormatEnum, DownloadQualityEnum, VideoFormatEnum } from '@yd/client';
import { AudioFormat, DownloadQuality, VideoFormat } from '@yd/client';
import {
Alert,
CodeBracketIcon,
Expand Down Expand Up @@ -34,11 +34,11 @@
const formatGroups = [
{
text: 'Audio',
options: toSelectOptions(AudioFormatEnum)
options: toSelectOptions(AudioFormat)
},
{
text: 'Video',
options: toSelectOptions(VideoFormatEnum)
options: toSelectOptions(VideoFormat)
}
];
</script>
Expand Down Expand Up @@ -67,7 +67,7 @@
label="Quality:"
helpText="The preferred quality for the download."
bind:value={$settings.quality}
options={toSelectOptions(DownloadQualityEnum)}
options={toSelectOptions(DownloadQuality)}
on:change={() => toast.success('Updated', 'Quality settings updated successfully.')}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"svelte-check": "^3.7.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"vite": "^5.2.10"
"vite": "^5.2.11"
}
}
12 changes: 6 additions & 6 deletions apps/web/src/lib/stores/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { writable } from 'svelte/store';

import type { DownloadOptions } from '@yd/client';
import {
AudioFormatEnum,
AudioFormat,
DEFAULT_DOWNLOAD_OPTIONS,
DownloadQualityEnum,
VideoFormatEnum
DownloadQuality,
VideoFormat
} from '@yd/client';

const SETTINGS_KEY = 'yd-settings';
Expand All @@ -20,14 +20,14 @@ function createSettingsStore() {
if (data !== null) {
const parsedData = JSON.parse(data) as DownloadOptions;
const supportedFormats = [
...Object.values(AudioFormatEnum),
...Object.values(VideoFormatEnum)
...Object.values(AudioFormat),
...Object.values(VideoFormat)
];
// Make sure a value is set, if nothing is set use the default
if (!supportedFormats.includes(parsedData.format)) {
parsedData.format = DEFAULT_DOWNLOAD_OPTIONS.format;
}
if (!Object.values(DownloadQualityEnum).includes(parsedData.quality)) {
if (!Object.values(DownloadQuality).includes(parsedData.quality)) {
parsedData.quality = DEFAULT_DOWNLOAD_OPTIONS.quality;
}
if (parsedData.embed_metadata === undefined) {
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/routes/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import config from '$lib/config';
import { settings, userSettings } from '$lib/stores/settings';
import { AudioFormatEnum, DownloadQualityEnum, VideoFormatEnum } from '@yd/client';
import { AudioFormat, DownloadQuality, VideoFormat } from '@yd/client';
import {
Alert,
CodeBracketIcon,
Expand Down Expand Up @@ -38,11 +38,11 @@
const formatGroups = [
{
text: 'Audio',
options: toSelectOptions(AudioFormatEnum)
options: toSelectOptions(AudioFormat)
},
{
text: 'Video',
options: toSelectOptions(VideoFormatEnum)
options: toSelectOptions(VideoFormat)
}
];
</script>
Expand All @@ -69,7 +69,7 @@
label="Quality:"
helpText="The preferred quality for the download."
bind:value={$settings.quality}
options={toSelectOptions(DownloadQualityEnum)}
options={toSelectOptions(DownloadQuality)}
on:change={() => toast.success('Updated', 'Quality settings updated successfully.')}
/>
</div>
Expand Down
4 changes: 3 additions & 1 deletion packages/client/openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export default defineConfig({
input,
output: './src/generated',
client: 'fetch',
enums: 'javascript',
format: 'prettier',
types: {
enums: 'javascript'
},
schemas: false
});
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "prettier --write ."
},
"devDependencies": {
"@hey-api/openapi-ts": "^0.42.1",
"@hey-api/openapi-ts": "^0.43.0",
"@yd/api": "workspace:*",
"@yd/config": "workspace:*",
"prettier": "^3.2.5",
Expand Down
32 changes: 0 additions & 32 deletions packages/client/src/generated/enums.gen.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/client/src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI';
export * from './enums.gen';
export * from './services.gen';
export * from './types.gen';
67 changes: 37 additions & 30 deletions packages/client/src/generated/services.gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { CancelablePromise } from './core/CancelablePromise';
import type { $OpenApiTs } from './types.gen';
import type {
DeleteDownloadData,
DeleteDownloadResponse,
DeleteSessionResponse,
GetDownloadData,
GetDownloadFileData,
GetDownloadFileResponse,
GetDownloadResponse,
GetDownloadsOptionsResponse,
GetDownloadsResponse,
GetNextSearchResponse,
GetSearchData,
GetSearchResponse,
GetSessionResponse,
GetSessionValidateResponse,
GetVideoData,
GetVideoResponse,
PostDownloadsData,
PostDownloadsResponse,
PutDownloadsData,
PutDownloadsResponse
} from './types.gen';
import { OpenAPI } from './core/OpenAPI';
import { request as __request } from './core/request';

Expand All @@ -13,9 +34,7 @@ export class SearchService {
* @returns Video Successful Response
* @throws ApiError
*/
public static getSearch(
data: $OpenApiTs['/search']['get']['req']
): CancelablePromise<$OpenApiTs['/search']['get']['res'][200]> {
public static getSearch(data: GetSearchData): CancelablePromise<GetSearchResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/search',
Expand All @@ -35,7 +54,7 @@ export class SearchService {
* @returns Video Successful Response
* @throws ApiError
*/
public static getNextSearch(): CancelablePromise<$OpenApiTs['/search/next']['get']['res'][200]> {
public static getNextSearch(): CancelablePromise<GetNextSearchResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/search/next',
Expand All @@ -53,9 +72,7 @@ export class SearchService {
* @returns Video Successful Response
* @throws ApiError
*/
public static getVideo(
data: $OpenApiTs['/search/video']['get']['req']
): CancelablePromise<$OpenApiTs['/search/video']['get']['res'][200]> {
public static getVideo(data: GetVideoData): CancelablePromise<GetVideoResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/search/video',
Expand All @@ -77,7 +94,7 @@ export class SessionService {
* @returns Session Successful Response
* @throws ApiError
*/
public static getSession(): CancelablePromise<$OpenApiTs['/session']['get']['res'][200]> {
public static getSession(): CancelablePromise<GetSessionResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/session'
Expand All @@ -89,7 +106,7 @@ export class SessionService {
* @returns void Successful Response
* @throws ApiError
*/
public static deleteSession(): CancelablePromise<$OpenApiTs['/session']['delete']['res'][204]> {
public static deleteSession(): CancelablePromise<DeleteSessionResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/session',
Expand All @@ -104,9 +121,7 @@ export class SessionService {
* @returns Session Successful Response
* @throws ApiError
*/
public static getSessionValidate(): CancelablePromise<
$OpenApiTs['/session/validate']['get']['res'][200]
> {
public static getSessionValidate(): CancelablePromise<GetSessionValidateResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/session/validate',
Expand All @@ -123,7 +138,7 @@ export class DownloadsService {
* @returns Download Successful Response
* @throws ApiError
*/
public static getDownloads(): CancelablePromise<$OpenApiTs['/downloads']['get']['res'][200]> {
public static getDownloads(): CancelablePromise<GetDownloadsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/downloads',
Expand All @@ -140,9 +155,7 @@ export class DownloadsService {
* @returns Download Successful Response
* @throws ApiError
*/
public static putDownloads(
data: $OpenApiTs['/downloads']['put']['req']
): CancelablePromise<$OpenApiTs['/downloads']['put']['res'][200]> {
public static putDownloads(data: PutDownloadsData): CancelablePromise<PutDownloadsResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/downloads',
Expand All @@ -162,9 +175,7 @@ export class DownloadsService {
* @returns Download Successful Response
* @throws ApiError
*/
public static postDownloads(
data: $OpenApiTs['/downloads']['post']['req']
): CancelablePromise<$OpenApiTs['/downloads']['post']['res'][201]> {
public static postDownloads(data: PostDownloadsData): CancelablePromise<PostDownloadsResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/downloads',
Expand All @@ -182,9 +193,7 @@ export class DownloadsService {
* @returns AvailableDownloadOptions Successful Response
* @throws ApiError
*/
public static getDownloadsOptions(): CancelablePromise<
$OpenApiTs['/downloads/options']['get']['res'][200]
> {
public static getDownloadsOptions(): CancelablePromise<GetDownloadsOptionsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/downloads/options',
Expand All @@ -201,9 +210,7 @@ export class DownloadsService {
* @returns Download Successful Response
* @throws ApiError
*/
public static getDownload(
data: $OpenApiTs['/downloads/{download_id}']['get']['req']
): CancelablePromise<$OpenApiTs['/downloads/{download_id}']['get']['res'][200]> {
public static getDownload(data: GetDownloadData): CancelablePromise<GetDownloadResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/downloads/{download_id}',
Expand All @@ -226,8 +233,8 @@ export class DownloadsService {
* @throws ApiError
*/
public static deleteDownload(
data: $OpenApiTs['/downloads/{download_id}']['delete']['req']
): CancelablePromise<$OpenApiTs['/downloads/{download_id}']['delete']['res'][204]> {
data: DeleteDownloadData
): CancelablePromise<DeleteDownloadResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/downloads/{download_id}',
Expand All @@ -250,8 +257,8 @@ export class DownloadsService {
* @throws ApiError
*/
public static getDownloadFile(
data: $OpenApiTs['/downloads/{download_id}/file']['get']['req']
): CancelablePromise<$OpenApiTs['/downloads/{download_id}/file']['get']['res'][200]> {
data: GetDownloadFileData
): CancelablePromise<GetDownloadFileResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/downloads/{download_id}/file',
Expand Down
Loading

0 comments on commit 2040c5d

Please sign in to comment.