just log everything sadly

This commit is contained in:
0d0 2025-04-19 18:50:10 +02:00
parent e3c0c7d1f9
commit 716ebe9ecd
4 changed files with 13 additions and 10 deletions

View file

@ -29,14 +29,15 @@ jobs:
- name: Create Release
run: |
npm ci
touch .env
echo "HOST=0.0.0.0" >> .env
echo "ORIGIN=https://dl.emersa.it" >> .env
echo "PUBLIC_VERSION=$(cat package.json | jq .version)" >> .env
echo "NODE_ENV=production" >> .env
touch .env.production
echo "HOST=0.0.0.0" >> .env.production
echo "PORT=3000" >> .env.production
echo "ORIGIN=https://dl.emersa.it" >> .env.production
echo "PUBLIC_VERSION=$(cat package.json | jq .version)" >> .env.production
echo "NODE_ENV=production" >> .env.production
npm run build
cp package* build/
cp .env build/
cp .env.production build/
mkdir releases
cd build/
tar czvf ../releases/build.tar.gz .

View file

@ -29,5 +29,5 @@ tar -xvf build.tar.gz -C .
rm build.tar.gz
npm ci
npm run download-yt-dlp
echo "YTDLP_PATH=$(readlink -f yt-dlp)" >>.env
echo "HTTPS_PROXY=${PROXY}" >>.env
echo "YTDLP_PATH=$(readlink -f yt-dlp)" >> .env.production
echo "HTTPS_PROXY=${PROXY}" >> .env.production

View file

@ -1,12 +1,12 @@
import formats from '$lib/common/supportedFormats.json';
import winston from 'winston';
import { dev } from '$app/environment';
export const logger = winston.createLogger({
level: import.meta.env.DEV ? 'debug' : 'error',
level: 'debug',
format: winston.format.json(),
transports: [new winston.transports.Console()]
});
logger.debug(import.meta.env.DEV)
const formatMime = new Map(Object.entries(formats));
export const isURLValid = (url: string) => {
try {

View file

@ -41,6 +41,8 @@ export const GET: RequestHandler = async ({ url }) => {
let filename = '';
let contentLength = 0;
logger.debug(`Requested: ${link}`);
try {
logger.debug(`Fetching video data to set filename`);
// Fetch metadata for filename