fix(livia): Dateiendungen in den Importen der serverlosen Funktion
Erster Produktionslauf schlug mit HTTP 500 fehl, lokal lief derselbe Code grün. Ursache: Vercel kompiliert jede Datei einzeln statt sie zu bündeln, und weil das Projekt `"type": "module"` ist, verlangt Nodes ESM-Lader explizite Dateiendungen in relativen Importen. Vite löst im Entwicklungsbetrieb grosszügiger auf und verdeckt das. Das ist genau die Klasse Fehler, die kein Typecheck und kein Test findet — nur ein echter Aufruf gegen die deployte Funktion. Geprüft gegen Produktion: HTTP 200, 20 Einträge aus 3/3 Quellen in 24 Sekunden, Beurteilung läuft, Originalquellen verlinkt, keine Laufzeitfehler. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
93ecc852e3
commit
f53f3be1e8
3 files changed
+7
-7
No files matched your search
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
import Anthropic from '@anthropic-ai/sdk'
|
import Anthropic from '@anthropic-ai/sdk'
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import type { ResearchItem } from './researchSources'
|
import type { ResearchItem } from './researchSources.js'
|
||||||
import type { ResearchLead } from '../../src/domain/researchLead'
|
import type { ResearchLead } from '../../src/domain/researchLead.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Der Beurteilungsauftrag (§12).
|
* Der Beurteilungsauftrag (§12).
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as cheerio from 'cheerio'
|
import * as cheerio from 'cheerio'
|
||||||
import { RESEARCH_SOURCES } from '../../src/lib/researchSources'
|
import { RESEARCH_SOURCES } from '../../src/lib/researchSources.js'
|
||||||
|
|
||||||
/** Gemeinsames Minimalformat aller Quellen (§9). */
|
/** Gemeinsames Minimalformat aller Quellen (§9). */
|
||||||
export interface ResearchItem {
|
export interface ResearchItem {
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ import {
|
|||||||
fetchZhkResearch,
|
fetchZhkResearch,
|
||||||
fetchGreaterZurichResearch,
|
fetchGreaterZurichResearch,
|
||||||
fetchZefixResearch,
|
fetchZefixResearch,
|
||||||
} from '../../_lib/researchSources'
|
} from '../../_lib/researchSources.js'
|
||||||
import type { ResearchItem } from '../../_lib/researchSources'
|
import type { ResearchItem } from '../../_lib/researchSources.js'
|
||||||
import { analyzeResearchItems } from '../../_lib/researchAnalysis'
|
import { analyzeResearchItems } from '../../_lib/researchAnalysis.js'
|
||||||
import type { ResearchRefreshResult, ResearchSourceResult } from '../../../src/domain/researchLead'
|
import type { ResearchRefreshResult, ResearchSourceResult } from '../../../src/domain/researchLead.js'
|
||||||
|
|
||||||
interface Quelle {
|
interface Quelle {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
Reference in new issue
Block a user