fix: cache no-store sur routes API, EUR emploi, NZD OIS (RBNZ), ReportTab charts 750px

- app/api/*/route.ts : export const dynamic = force-dynamic + Cache-Control no-store
- lib/tecpi.ts : regex emploi EUR (grew/rose/fell), fallback body HTML, unite %/percent
- lib/rateprobability.ts : RBNZ_MEETINGS 2026-2027, buildRBNZPath (mirrors buildSNBPath)
  CHF/NZD skippes du loop Investing.com (SNB/RBNZ rate monitor = 404)
  Taux RBNZ 2.25% (etait 3.25%)
- components/ReportTab.tsx : hauteur charts 400 -> 750px (SPX, VIX, DXY, Gold)
- lib/tradingeconomics.ts, lib/types.ts, lib/newsfeed.ts : correctifs associes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
caty21
2026-06-29 12:17:11 +02:00
parent eca5800372
commit f5e5d51c72
13 changed files with 250 additions and 74 deletions
+8 -4
View File
@@ -3,6 +3,8 @@ import { inflateRawSync } from "zlib";
import { COT_CODES } from "@/lib/constants";
import type { Currency, CotEntry } from "@/lib/types";
export const dynamic = "force-dynamic";
// ── CFTC Traders in Financial Futures (TFF) — fichier annuel ZIP ──────────────
// URL : https://www.cftc.gov/files/dea/history/fut_fin_txt_YYYY.zip
// Contient toutes les semaines de l'année en ordre décroissant.
@@ -163,10 +165,12 @@ function parseCOT(csv: string): Record<string, CotEntry> {
amShorts: cur.amShorts,
amLongPct: amTotal > 0 ? Math.round((cur.amLongs / amTotal) * 100) : 50,
amTotal,
netDelta: prev !== null ? hfNet - (prev.hfLongs - prev.hfShorts) : null,
longsDelta: prev !== null ? cur.hfLongs - prev.hfLongs : null,
shortsDelta: prev !== null ? cur.hfShorts - prev.hfShorts : null,
amNetDelta: prev !== null ? amNet - (prev.amLongs - prev.amShorts) : null,
netDelta: prev !== null ? hfNet - (prev.hfLongs - prev.hfShorts) : null,
longsDelta: prev !== null ? cur.hfLongs - prev.hfLongs : null,
shortsDelta: prev !== null ? cur.hfShorts - prev.hfShorts : null,
amNetDelta: prev !== null ? amNet - (prev.amLongs - prev.amShorts) : null,
amLongsDelta: prev !== null ? cur.amLongs - prev.amLongs : null,
amShortsDelta: prev !== null ? cur.amShorts - prev.amShorts : null,
weekDate: cur.weekDate,
prevWeekDate: prev?.weekDate ?? null,
};
+3 -1
View File
@@ -1,6 +1,8 @@
import { NextResponse } from "next/server";
import { fetchTEBondYields } from "@/lib/tebonds";
export const dynamic = "force-dynamic";
// ── FRED (spreads crédit + rendements) ───────────────────────────────────────
// VIX et S&P500 ne passent plus par FRED (lag 1-2j) → Yahoo Finance (temps réel)
@@ -294,5 +296,5 @@ export async function GET() {
// Compat
copper: null,
timestamp: Date.now(),
});
}, { headers: { "Cache-Control": "no-store" } });
}
+2
View File
@@ -1,6 +1,8 @@
import { NextRequest, NextResponse } from "next/server";
import { FRED_SERIES } from "@/lib/constants";
import type { Currency } from "@/lib/types";
export const dynamic = "force-dynamic";
import cpiOverridesRaw from "@/data/cpi_overrides.json";
import rateDecisionsRaw from "@/data/rate_decisions.json";
import { fetchFFThisWeek, fetchFFEvents } from "@/lib/forexfactory";
+2
View File
@@ -1,5 +1,7 @@
import { NextResponse } from "next/server";
export const dynamic = "force-dynamic";
// ── Myfxbook Community Outlook API ────────────────────────────────────────────
// Source : https://www.myfxbook.com/community/outlook
// Auth : login.json → session token → get-community-outlook.json