puppeteer-pro
Version:
A simple puppeteer wrapper to enable useful plugins with ease
34 lines • 1.14 kB
TypeScript
import { Plugin } from '../..';
export interface ManageLocalStorageOption {
saveLocation: string;
mode: 'manual' | 'monitor';
stringify?: (localStorage: Record<string, LocalStorage>) => string;
parse?: (localStorage: string) => Record<string, LocalStorage>;
disableWarning?: boolean;
profile?: 'string';
}
export declare class ManageLocalStoragePlugin extends Plugin {
private saveLocation;
private mode;
private stringify;
private parse;
private disableWarning;
private profile;
private allLocalStorage;
constructor(opts: ManageLocalStorageOption);
protected afterLaunch(): Promise<void>;
protected afterRestart(): Promise<void>;
switchToProfile(profile: string): Promise<void>;
save(): Promise<void>;
load(): Promise<void>;
clear(): Promise<void>;
private watchLocalStorage;
private saveProfileLocalStorage;
private loadProfileLocalStorage;
private clearProfileLocalStorage;
private setLocalStorage;
private getLocalStorage;
}
type LocalStorage = Record<string, Record<string, string>>;
export {};
//# sourceMappingURL=index.d.ts.map