core/adapters/package.adapter.ts

core/adapters/package.adapter.ts is a file in Bane's Lab Deploy. 8 lines of code and 2 definitions.

import { INDEX_FETCH_FAILED } from "#configuration/strings/nginx.strings";

export const fetchIndex = async function fetchIndex(url: string): Promise<string> {
    const response = await fetch(url);
    if (!response.ok) {
        throw new Error(`${INDEX_FETCH_FAILED}${url} ${String(response.status)}`);
    }
    return response.text();
};