wordpress-playground-handler
Version:
A Node.js library for creating and managing WordPress Playground instances with PHP request handling capabilities. Optimized for Node.js runtime environments.
31 lines (30 loc) • 913 B
TypeScript
/**
* Lightweight version for Node.js serverless deployment
* Uses external WordPress instances instead of bundling heavy WASM files
*/
export interface LightweightPlaygroundOptions {
wordpressUrl?: string;
authToken?: string;
blueprint?: any;
}
export declare class LightweightPlaygroundHandler {
private wordpressUrl;
private authToken?;
constructor(options?: LightweightPlaygroundOptions);
request(request: {
method: string;
url: string;
body?: any;
headers?: any;
}): Promise<{
httpStatusCode: number;
headers: {
[k: string]: any;
};
bytes: Uint8Array<ArrayBuffer>;
text: string;
json: any;
}>;
}
export declare function getLightweightPlaygroundHandler(options?: LightweightPlaygroundOptions): Promise<LightweightPlaygroundHandler>;
export default LightweightPlaygroundHandler;