@platform/react.ssr
Version:
An SSR (server-side-render) system for react apps bundled with ParcelJS and hosted on S3.
70 lines (69 loc) • 1.85 kB
TypeScript
import { t } from '../common';
import { Site } from './Site';
declare type IPullResonse = {
ok: boolean;
status: number;
manifest?: Manifest;
error?: Error;
};
declare type IManifestArgs = {
baseUrl: string;
def: t.IManifest;
status?: number;
};
export declare class Manifest {
static reset(): void;
static fromFile(args: {
path: string;
baseUrl: string;
}): Promise<Manifest>;
static fromUrl(args: {
manifestUrl: string;
baseUrl?: string;
loadBundleManifest?: boolean;
}): Promise<IPullResonse>;
static fromYaml(args: {
yaml: string;
baseUrl: string;
loadBundleManifest?: boolean;
}): Promise<Manifest>;
static parse(args: {
yaml: string;
baseUrl: string;
loadBundleManifest?: boolean;
}): Promise<t.IManifest>;
static get(args: {
manifestUrl: string;
baseUrl: string;
force?: boolean;
loadBundleManifest?: boolean;
}): Promise<Manifest>;
static create: (args: IManifestArgs) => Manifest;
private constructor();
readonly status: number;
readonly baseUrl: string;
private readonly def;
private _sites;
readonly ok: boolean;
readonly sites: Site[];
readonly site: {
byName: (name?: string | undefined) => Site | undefined;
byHost: (domain?: string | undefined) => Site | undefined;
};
readonly change: {
site: (id: string | Site) => {
bundle: (args: {
value: string;
saveTo?: string | undefined;
}) => Promise<Manifest | undefined>;
};
};
toObject(): {
sites: t.ISiteManifest[];
status: number;
};
save(path: string, options?: {
minimal?: boolean;
}): Promise<void>;
}
export {};