GitNexus/gitnexus/test/fixtures/lang-resolution/configurable-fetch-wrapper/lib/http.ts
Richie Wee b51f25606c
Some checks failed
Devcontainer Smoke / Build devcontainer image (push) Has been cancelled
Devcontainer Smoke / Config-transform unit tests (push) Has been cancelled
Skill copy sync / shipped skills drift guard (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Gitleaks / gitleaks (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-cli) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Publish / Classify release event (push) Waiting to run
Publish / RC guard (marker + release-PR skip) (push) Blocked by required conditions
Publish / ci (push) Blocked by required conditions
Publish / Publish to npm (push) Blocked by required conditions
Publish / Build & Push RC Docker images (push) Blocked by required conditions
Scorecard / Scorecard analysis (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-web) (push) Waiting to run
fix(routes): match configured fetch wrapper calls that pass type arguments (#3567)
2026-10-15 20:08:56 +03:00

11 lines
491 B
TypeScript

import axios from 'axios';
const API_BASE = process.env.API_BASE || '';
// A custom HTTP wrapper built on axios — it never calls the bare global
// `fetch()`, so the parse-phase auto-detector cannot flag it. Listing
// "doRequest" in `.gitnexusrc` `fetchWrappers` is what lets the routes phase
// trace its consumers (#1589/#1852 residual).
export async function doRequest<T = unknown>(path: string, opts?: Record<string, unknown>) {
return axios.get<T>(`${API_BASE}${path}`, opts);
}