sass-template-common 0.10.27 → 0.10.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sass-template-common.d.ts +53 -12
- package/dist/sass-template-common.js +2781 -2703
- package/dist/sass-template-common.umd.cjs +27 -27
- package/package.json +1 -1
|
@@ -394,6 +394,13 @@ export declare function clearConfigOriginCache(cacheKey?: string): void;
|
|
|
394
394
|
|
|
395
395
|
export declare function clearConfigOriginComparisonCache(): void;
|
|
396
396
|
|
|
397
|
+
/**
|
|
398
|
+
* Timeout para listados CMS usados en SSR paralelo (`news-list-section`,
|
|
399
|
+
* `news-list-author`, etc.). Más corto que el axios global (10s): acota el
|
|
400
|
+
* peor caso sin cortar de más respuestas lentas pero válidas (~5–7s en frío).
|
|
401
|
+
*/
|
|
402
|
+
export declare const CMS_LIST_FETCH_TIMEOUT_MS = 8000;
|
|
403
|
+
|
|
397
404
|
export declare const coloringByStrokeSVGs: string[];
|
|
398
405
|
|
|
399
406
|
/** Textos del popup anónimo (AnonimusPopUp.tsx) */
|
|
@@ -597,16 +604,36 @@ export declare class CommonServices {
|
|
|
597
604
|
data: Array<MenuResponse>;
|
|
598
605
|
};
|
|
599
606
|
}>;
|
|
600
|
-
getNewsListZone: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
607
|
+
getNewsListZone: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
608
|
+
data: NewListResponse;
|
|
609
|
+
}> | undefined;
|
|
610
|
+
getNewsListZoneSection: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
611
|
+
data: NewListResponse;
|
|
612
|
+
}> | undefined;
|
|
613
|
+
getNewsList: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
614
|
+
data: NewListResponse;
|
|
615
|
+
}> | undefined;
|
|
616
|
+
getNewsListTag: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
617
|
+
data: NewListResponse;
|
|
618
|
+
}> | undefined;
|
|
619
|
+
getNewsListSection: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
620
|
+
data: NewListResponse;
|
|
621
|
+
}> | undefined;
|
|
622
|
+
getNewsListAvanced: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
623
|
+
data: NewListResponse;
|
|
624
|
+
}> | undefined;
|
|
625
|
+
getNewsListTags: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
626
|
+
data: NewListResponse;
|
|
627
|
+
}> | undefined;
|
|
628
|
+
getNewsListTagEntity: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
629
|
+
data: NewListResponse;
|
|
630
|
+
}> | undefined;
|
|
631
|
+
getNewsListTagLite: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
632
|
+
data: NewListResponse;
|
|
633
|
+
}> | undefined;
|
|
634
|
+
getNewsListAutor: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}> | {
|
|
635
|
+
data: NewListResponse;
|
|
636
|
+
}> | undefined;
|
|
610
637
|
getNewsSearch: (params: Params) => Promise<AxiosResponse<NewListResponse, any, {}>> | undefined;
|
|
611
638
|
getAutorInfo: (params: Params) => Promise<AxiosResponse<{
|
|
612
639
|
data: Array<AutorInfo>;
|
|
@@ -663,7 +690,9 @@ export declare class CommonServices {
|
|
|
663
690
|
search: AxiosResponse<NewListResponse, any, {}>;
|
|
664
691
|
lastNews?: undefined;
|
|
665
692
|
} | {
|
|
666
|
-
lastNews: AxiosResponse<NewListResponse, any, {}> |
|
|
693
|
+
lastNews: AxiosResponse<NewListResponse, any, {}> | {
|
|
694
|
+
data: NewListResponse;
|
|
695
|
+
} | undefined;
|
|
667
696
|
search?: undefined;
|
|
668
697
|
}>;
|
|
669
698
|
commonNewsServices: (path: string, imgSizes?: {
|
|
@@ -806,6 +835,7 @@ export declare type ConfigOriginAuditReport = {
|
|
|
806
835
|
network: number;
|
|
807
836
|
cacheHit: number;
|
|
808
837
|
dedup: number;
|
|
838
|
+
stale: number;
|
|
809
839
|
api: number;
|
|
810
840
|
bucket: number;
|
|
811
841
|
networkMs: number;
|
|
@@ -833,7 +863,7 @@ export declare type ConfigOriginComparisonRow = {
|
|
|
833
863
|
deltaMs: number;
|
|
834
864
|
};
|
|
835
865
|
|
|
836
|
-
export declare type ConfigOriginOutcome = 'network' | 'cache-hit' | 'dedup';
|
|
866
|
+
export declare type ConfigOriginOutcome = 'network' | 'cache-hit' | 'dedup' | 'stale';
|
|
837
867
|
|
|
838
868
|
export declare type ConfigOriginTimingStats = {
|
|
839
869
|
ok: boolean;
|
|
@@ -1184,10 +1214,14 @@ export declare function fetchMaybeBatched(route: string, fetchFn: (size: number,
|
|
|
1184
1214
|
/**
|
|
1185
1215
|
* Cache in-memory + deduplicación de requests en vuelo (misma clave → misma promesa).
|
|
1186
1216
|
* TTL corto pensado para SSR: evita 4–5 GETs repetidos de menú/banners por instancia.
|
|
1217
|
+
*
|
|
1218
|
+
* Con `staleOnError: true`, un fallo de red/timeout no cachea vacío: sirve el último
|
|
1219
|
+
* valor OK de esa clave (si existe) y deja que el caller decida el fallback final.
|
|
1187
1220
|
*/
|
|
1188
1221
|
export declare function fetchWithConfigCache<T>(cacheKey: string, fetchFn: () => Promise<T>, options?: number | {
|
|
1189
1222
|
ttlMs?: number;
|
|
1190
1223
|
shouldCache?: (value: T) => boolean;
|
|
1224
|
+
staleOnError?: boolean;
|
|
1191
1225
|
}): Promise<T>;
|
|
1192
1226
|
|
|
1193
1227
|
export declare const Font: ({ config }: {
|
|
@@ -1824,6 +1858,13 @@ export declare const JournalistGroup: FC<Props_50>;
|
|
|
1824
1858
|
|
|
1825
1859
|
export declare const LayoutNewsComponent: FC<Props_47>;
|
|
1826
1860
|
|
|
1861
|
+
/**
|
|
1862
|
+
* Timeout del fetch legacy CMS (`/config/menu`, `/config/banners`).
|
|
1863
|
+
* Sin esto, un socket colgado envenena la promesa in-flight del cache y tumba
|
|
1864
|
+
* todos los renders de esa instancia hasta que el Lambda se recicle.
|
|
1865
|
+
*/
|
|
1866
|
+
export declare const LEGACY_CONFIG_FETCH_TIMEOUT_MS = 5000;
|
|
1867
|
+
|
|
1827
1868
|
export declare type LibraryConfig = {
|
|
1828
1869
|
PUBLIC_API_HOST?: string;
|
|
1829
1870
|
PUBLIC_API_FRONT?: string;
|