@fly/cdn
Version:
Fly's TypeScript CDN
39 lines (38 loc) • 994 B
TypeScript
/**
* @module Backends
*/
import { ProxyFunction } from "../proxy";
/**
* GitHub Repository information.
*/
export interface GitHubPagesOptions {
/** Repository owner */
owner: string;
/** Repository name <repository> format */
repository: string;
/** The custom hostname on repository */
hostname?: string;
}
/**
* Creates a fetch-like proxy function for making requests to GitHub pages
* hosted sites.
*
* Example:
*
* ```typescript
* import { githubPages } from "./src/backends";
* const backend = githubPages({
* owner: "superfly",
* repo: "cdn",
* hostname: "docs.fly.io"
* });
* ```
* @param config The Github repository to proxy to
* @module Backends
*/
export declare function githubPages(options: GitHubPagesOptions | string): ProxyFunction<GitHubPagesOptions>;
export declare namespace githubPages {
var normalizeOptions: typeof _normalizeOptions;
}
declare function _normalizeOptions(input: unknown): GitHubPagesOptions;
export {};