File: //proc/self/root/tmp/bm-build-path-redirect.mjs
import path from 'node:path';
import { syncBuiltinESMExports } from 'node:module';
const resolve = path.resolve.bind(path);
const redirectedPaths = new Map([
['/home/bewertemich.de/web/public', '/tmp/bm-work-build/public'],
['/home/bewertemich.de/storage/reports/photo-detail-latest.json', '/tmp/bm-work-build/reports/photo-detail-latest.json']
]);
path.resolve = (...parts) => {
const resolved = resolve(...parts);
return redirectedPaths.get(resolved) || resolved;
};
syncBuiltinESMExports();
const fetch = globalThis.fetch;
globalThis.fetch = (input, init) => {
const url = String(input);
if (url.startsWith('https://bewertemich.de/api/leaderboards/')) {
return Promise.resolve(new Response(JSON.stringify({ data: [] }), {
status: 200,
headers: { 'content-type': 'application/json' }
}));
}
return fetch(input, init);
};