/** * Puppeteer doesn't allow importing ESM modules from `file://` URLs. * We don't want to create a dummy http server to serve ESM modules * (since that would cause issues with ports/firewalls), so this module * instead intercepts dummy `https://mermaid-cli-intercept.invalid` requests. */ export class Interceptor { /** * @param {URL | `file://${string}`} fileUrl - File URL */ fileUrlToInterceptUrl(fileUrl: URL | `file://${string}`): Promise; /** * * @param {URL | string} interceptUrl * @throws {Error} If the URL is not a valid intercept URL */ interceptUrlToFileUrl(interceptUrl: URL | string): Promise; /** * Intercepts requests to `https://mermaid-cli-intercept.invalid` * and serves the corresponding file content. * * @return {puppeteer.Handler} */ get interceptRequestHandler(): puppeteer.Handler; #private; } import type puppeteer from 'puppeteer'; //# sourceMappingURL=puppeteerIntercept.d.ts.map