From 25647514053e770add4c6c38bb6f8f3f0692f4a7 Mon Sep 17 00:00:00 2001 From: marcobaobao Date: Thu, 26 Oct 2023 17:53:39 +0200 Subject: [PATCH] small fixes --- Dockerfile | 3 ++- frontend/src/types/index.ts | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1538bb2..41fe513 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ FROM golang:alpine AS build RUN apk update && \ - apk add nodejs-current npm + apk add nodejs npm COPY . /usr/src/yt-dlp-webui WORKDIR /usr/src/yt-dlp-webui/frontend + RUN npm install RUN npm run build diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 79f3952..8b7cbc2 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -16,11 +16,11 @@ export type RPCRequest = { id?: string } -export type RPCResponse = { +export type RPCResponse = Readonly<{ result: T error: number | null id?: string -} +}> type DownloadInfo = { url: string @@ -41,18 +41,18 @@ type DownloadProgress = { process_status: number } -export type RPCResult = { +export type RPCResult = Readonly<{ id: string progress: DownloadProgress info: DownloadInfo -} +}> export type RPCParams = { URL: string Params?: string } -export interface DLMetadata { +export type DLMetadata = { formats: Array best: DLFormat thumbnail: string