Files
klz-cables.com/.pnpm-store/v10/files/60/dfa3a2ffe727c0b292ac1ba83469f9a880f345452b934c384ddfd83241e6f71acb8e77b459cd3bb567a3c449e7254ad319d7f1bd1b5264d07f3d210a939e53
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

28 lines
1.3 KiB
Plaintext

type MinimalCloudflareContext = {
waitUntil(promise: Promise<any>): void;
};
/**
* Flushes the event queue with a timeout in serverless environments to ensure that events are sent to Sentry before the
* serverless function execution ends.
*
* The function is async, but in environments that support a `waitUntil` mechanism, it will run synchronously.
*
* This function is aware of the following serverless platforms:
* - Cloudflare: If a Cloudflare context is provided, it will use `ctx.waitUntil()` to flush events (keeps the `this` context of `ctx`).
* If a `cloudflareWaitUntil` function is provided, it will use that to flush events (looses the `this` context of `ctx`).
* - Vercel: It detects the Vercel environment and uses Vercel's `waitUntil` function.
* - Other Serverless (AWS Lambda, Google Cloud, etc.): It detects the environment via environment variables
* and uses a regular `await flush()`.
*
* @internal This function is supposed for internal Sentry SDK usage only.
* @hidden
*/
export declare function flushIfServerless(params?: {
timeout?: number;
cloudflareWaitUntil?: (task: Promise<any>) => void;
} | {
timeout?: number;
cloudflareCtx?: MinimalCloudflareContext;
}): Promise<void>;
export {};
//# sourceMappingURL=flushIfServerless.d.ts.map