/** * earth-now.co * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: apps/ingest/src/fetch-like.ts * Purpose: Minimal structural fetch interface so tests inject fixture-backed fakes and never hit the network */ export interface FetchResponseLike { ok: boolean; status: number; text(): Promise; } export type FetchLike = (url: string) => Promise; /** Default implementation: the global fetch (Node 20+). Response satisfies FetchResponseLike structurally. */ export const defaultFetch: FetchLike = (url) => fetch(url);