fix: relax bundle config requirements and default assetsBaseUrl

This commit is contained in:
Pandipipas
2026-03-03 20:24:56 +01:00
parent a93492b86b
commit d4fe407b92
4 changed files with 12 additions and 14 deletions
+2 -2
View File
@@ -72,12 +72,12 @@ const requestHeaders = {
const getConfiguredAssetsBaseUrl = () => {
const configuredValue = nodecg.bundleConfig.assetsBaseUrl;
if (typeof configuredValue !== 'string') {
throw new Error('La configuración assetsBaseUrl es obligatoria y debe ser un string.');
return 'http://localhost';
}
const trimmed = configuredValue.trim();
if (!trimmed) {
throw new Error('La configuración assetsBaseUrl es obligatoria para descargar assets por HTTP.');
return 'http://localhost';
}
return trimmed.replace(/\/+$/, '');
+3 -3
View File
@@ -7,7 +7,7 @@
*/
export interface Configschema {
exampleProperty: string;
exampleProperty?: string;
/**
* Client ID de tu OAuth app de start.gg
*/
@@ -33,7 +33,7 @@ export interface Configschema {
*/
challongeOAuthPort?: number;
/**
* URL base obligatoria para descargar assets por HTTP (ej: http://192.168.1.50:8080).
* URL base para descargar assets por HTTP (ej: http://192.168.1.50:8080). Por defecto usa http://localhost.
*/
assetsBaseUrl: string;
assetsBaseUrl?: string;
}