CINXE.COM

AsyncLocalStorage · Cloudflare Workers docs

<!doctype html> <html lang="en" dir="ltr" data-has-toc data-has-sidebar data-theme="dark" class="astro-bguv2lll"> <head> <base href="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/"> <script type="module">const t=document.querySelectorAll("a");function c(e,n){zaraz.track(e,{href:n.href,hostname:n.hostname})}function i(){if(!(!t||t.length===0))for(const e of t){if(!e.href)continue;const n=new URL(e.href),o=new RegExp("^[^.]+?\\.cloudflare\\.com");n.hostname!=="developers.cloudflare.com"&&(n.hostname==="workers.cloudflare.com"&&n.pathname.startsWith("/playground#")?e.addEventListener("click",()=>{c("playground link click",e)}):o.test(n.hostname)?e.addEventListener("click",()=>{c("Cross Domain Click",e)}):e.addEventListener("click",()=>{c("external link click",e)}))}}i();</script> <script type="module" src="/_astro/Head.astro_astro_type_script_index_1_lang.BJ-FY6qB.js"></script> <script type="module" src="/_astro/Head.astro_astro_type_script_index_2_lang.Dfph1UEd.js"></script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>AsyncLocalStorage · Cloudflare Workers docs</title> <link rel="canonical" href="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/"> <link rel="sitemap" href="/sitemap-index.xml"> <link rel="shortcut icon" href="/favicon.png" type="image/png"> <meta name="generator" content="Astro v4.16.12"> <meta name="generator" content="Starlight v0.29.2"> <meta property="og:type" content="article"> <meta property="og:url" content="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/"> <meta property="og:locale" content="en"> <meta property="og:description" content="Cloudflare Workers provides an implementation of a subset of the Node.js AsyncLocalStorage ↗ API for creating in-memory stores that remain coherent through asynchronous operations."> <meta property="og:site_name" content="Cloudflare Docs"> <meta name="twitter:card" content="summary_large_image"> <meta name="description" content="Cloudflare Workers provides an implementation of a subset of the Node.js AsyncLocalStorage ↗ API for creating in-memory stores that remain coherent through asynchronous operations."> <meta name="image" content="https://developers.cloudflare.com/cf-twitter-card.png"> <meta name="og:image" content="https://developers.cloudflare.com/cf-twitter-card.png"> <meta name="twitter:image" content="https://developers.cloudflare.com/cf-twitter-card.png"> <meta property="og:title" content="AsyncLocalStorage · Cloudflare Workers docs"> <meta name="pcx_product" content="Workers"> <meta name="algolia_product_filter" content="Workers"> <meta name="pcx_content_group" content="Developer platform"> <meta name="pcx_content_type" content="configuration"> <meta name="algolia_content_type" content="configuration"> <script> window.StarlightThemeProvider = (() => { const storedTheme = typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme'); const theme = storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'); document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark'; return { updatePickers(theme = storedTheme || 'auto') { document.querySelectorAll('starlight-theme-select').forEach((picker) => { const select = picker.querySelector('select'); if (select) select.value = theme; /** @type {HTMLTemplateElement | null} */ const tmpl = document.querySelector(`#theme-icons`); const newIcon = tmpl && tmpl.content.querySelector('.' + theme); if (newIcon) { const oldIcon = picker.querySelector('svg.label-icon'); if (oldIcon) { oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes); } } }); }, }; })(); </script> <template id="theme-icons"> <svg aria-hidden="true" class="light astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z" /> </svg> <svg aria-hidden="true" class="dark astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z" /> </svg> <svg aria-hidden="true" class="auto astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg> </template> <link rel="stylesheet" href="/_astro/props.DH3lyL-U.css"> <style>*,*:before,*:after{box-sizing:border-box}*{margin:0}html{color-scheme:dark;accent-color:var(--sl-color-accent)}html[data-theme=light]{color-scheme:light}body{font-family:var(--__sl-font);line-height:var(--sl-line-height);-webkit-font-smoothing:antialiased;color:var(--sl-color-text);background-color:var(--sl-color-bg)}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6,code{overflow-wrap:anywhere}code{font-family:var(--__sl-font-mono)} :root{--astro-code-color-text: var(--sl-color-white);--astro-code-color-background: var(--sl-color-gray-6);--astro-code-token-constant: var(--sl-color-blue-high);--astro-code-token-string: var(--sl-color-green-high);--astro-code-token-comment: var(--sl-color-gray-2);--astro-code-token-keyword: var(--sl-color-purple-high);--astro-code-token-parameter: var(--sl-color-red-high);--astro-code-token-function: var(--sl-color-red-high);--astro-code-token-string-expression: var(--sl-color-green-high);--astro-code-token-punctuation: var(--sl-color-gray-2);--astro-code-token-link: var(--sl-color-blue-high)} .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.sl-hidden{display:none}.sl-flex{display:flex}.sl-block{display:block}@media (min-width: 50rem){.md\:sl-hidden{display:none}.md\:sl-flex{display:flex}.md\:sl-block{display:block}}@media (min-width: 72rem){.lg\:sl-hidden{display:none}.lg\:sl-flex{display:flex}.lg\:sl-block{display:block}}[data-theme=light] .light\:sl-hidden,[data-theme=dark] .dark\:sl-hidden{display:none}[dir=rtl] .rtl\:flip:not(:where([dir=rtl] [dir=ltr] *)){transform:scaleX(-1)} .sl-banner:where(.astro-laz2plt2){--__sl-banner-text: var(--sl-color-banner-text, var(--sl-color-text-invert));padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);background-color:var(--sl-color-banner-bg, var(--sl-color-bg-accent));color:var(--__sl-banner-text);line-height:var(--sl-line-height-headings);text-align:center;text-wrap:balance;box-shadow:var(--sl-shadow-sm)}.sl-banner:where(.astro-laz2plt2) a{color:var(--__sl-banner-text)} .content-panel:where(.astro-7nkwcw3z){padding:1.5rem var(--sl-content-pad-x)}.content-panel:where(.astro-7nkwcw3z)+.content-panel:where(.astro-7nkwcw3z){border-top:1px solid var(--sl-color-hairline)}.sl-container:where(.astro-7nkwcw3z){max-width:var(--sl-content-width)}.sl-container:where(.astro-7nkwcw3z)>*+*{margin-top:1.5rem}@media (min-width: 72rem){.sl-container:where(.astro-7nkwcw3z){margin-inline:var(--sl-content-margin-inline, auto)}} p:where(.astro-opzsrvew){border:1px solid var(--sl-color-orange);padding:.75em 1em;background-color:var(--sl-color-orange-low);color:var(--sl-color-orange-high);width:-moz-max-content;width:max-content;max-width:100%;align-items:center;gap:.75em;font-size:var(--sl-text-body-sm);line-height:var(--sl-line-height-headings)} #ot-sdk-btn:where(.astro-hwxmvrii).ot-sdk-show-settings{border:none!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important;padding:inherit!important;font-family:var(--sl-font-family)!important}#ot-sdk-btn:where(.astro-hwxmvrii).ot-sdk-show-settings:hover{background-color:inherit!important} a:where(.astro-eez2twj6){gap:.5rem;align-items:center;text-decoration:none;color:var(--sl-color-gray-3)}a:where(.astro-eez2twj6):hover{color:var(--sl-color-white)} .bleed:where(.astro-fxeopwe4){box-shadow:0 0 0 100vmax #001c43!important;clip-path:inset(0 -100vmax)} .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} </style> <link rel="stylesheet" href="/_astro/markdown.BmaHg7Hb.css"> <style>.pagination-links:where(.astro-u2l5gyhi){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(18rem,100%),1fr));gap:1rem}a:where(.astro-u2l5gyhi){display:flex;align-items:center;justify-content:flex-start;gap:.5rem;width:100%;flex-basis:calc(50% - .5rem);flex-grow:1;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding:1rem;text-decoration:none;color:var(--sl-color-gray-2);box-shadow:var(--sl-shadow-md);overflow-wrap:anywhere}:where(.astro-u2l5gyhi)[rel=next]{justify-content:end;text-align:end;flex-direction:row-reverse}a:where(.astro-u2l5gyhi):hover{border-color:var(--sl-color-gray-2)}.link-title:where(.astro-u2l5gyhi){color:var(--sl-color-white);font-size:var(--sl-text-2xl);line-height:var(--sl-line-height-headings)}svg:where(.astro-u2l5gyhi){flex-shrink:0} </style> <link rel="stylesheet" href="/_astro/modal.CF_ijafl.css"> <style>:root{--docsearch-primary-color: var(--sl-color-text-accent);--docsearch-text-color: var(--sl-color-text);--docsearch-spacing: 12px;--docsearch-icon-stroke-width: 1.4;--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-muted-color: var(--sl-color-gray-3);--docsearch-container-background: var(--sl-color-backdrop-overlay);--docsearch-modal-width: 560px;--docsearch-modal-height: 600px;--docsearch-modal-background: var(--sl-color-gray-6);--docsearch-modal-shadow: var(--sl-shadow-lg);--docsearch-searchbox-height: 56px;--docsearch-searchbox-background: var(--sl-color-gray-7, var(--sl-color-gray-6));--docsearch-searchbox-focus-background: var(--sl-color-black);--docsearch-searchbox-shadow: inset 0 0 0 1px var(--docsearch-primary-color);--docsearch-hit-height: 56px;--docsearch-hit-color: var(--sl-color-white);--docsearch-hit-active-color: var(--sl-color-black);--docsearch-hit-background: var(--sl-color-black);--docsearch-key-gradient: linear-gradient( var(--sl-color-bg-inline-code) 0%, var(--sl-color-bg-inline-code) 100% );--docsearch-footer-height: 44px;--docsearch-footer-background: var(--sl-color-black);--docsearch-footer-shadow: 0 -1px 0 0 var(--sl-color-hairline-light)}.DocSearch-Modal{border:1px solid var(--sl-color-hairline-light)}.DocSearch-Logo svg *{fill:var(--docsearch-muted-color)} footer:where(.astro-3yyafb3n){flex-direction:column;gap:1.5rem}.meta:where(.astro-3yyafb3n){gap:.75rem 3rem;justify-content:space-between;flex-wrap:wrap;margin-top:3rem;font-size:var(--sl-text-sm);color:var(--sl-color-gray-3)}.meta:where(.astro-3yyafb3n)>p:only-child{margin-inline-start:auto}.kudos:where(.astro-3yyafb3n){align-items:center;gap:.5em;margin:1.5rem auto;font-size:var(--sl-text-xs);text-decoration:none;color:var(--sl-color-gray-3)}.kudos:where(.astro-3yyafb3n) svg{color:var(--sl-color-orange)}.kudos:where(.astro-3yyafb3n):hover{color:var(--sl-color-white)} .page:where(.astro-vrdttmbt){flex-direction:column;min-height:100vh}.header:where(.astro-vrdttmbt){z-index:var(--sl-z-index-navbar);position:fixed;inset-inline-start:0;inset-block-start:0;width:100%;height:var(--sl-nav-height);border-bottom:1px solid var(--sl-color-hairline-shade);padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);padding-inline-end:var(--sl-nav-pad-x);background-color:var(--sl-color-bg-nav)}[data-has-sidebar] .header:where(.astro-vrdttmbt){padding-inline-end:calc(var(--sl-nav-gap) + var(--sl-nav-pad-x) + var(--sl-menu-button-size))}.sidebar-pane:where(.astro-vrdttmbt){visibility:var(--sl-sidebar-visibility, hidden);position:fixed;z-index:var(--sl-z-index-menu);inset-block:var(--sl-nav-height) 0;inset-inline-start:0;width:100%;background-color:var(--sl-color-black);overflow-y:auto}[aria-expanded=true]~.sidebar-pane:where(.astro-vrdttmbt){--sl-sidebar-visibility: visible}.sidebar-content:where(.astro-vrdttmbt){height:100%;min-height:-moz-max-content;min-height:max-content;padding:1rem var(--sl-sidebar-pad-x) 0;flex-direction:column;gap:1rem}@media (min-width: 50rem){.sidebar-content:where(.astro-vrdttmbt):after{content:"";padding-bottom:1px}}.main-frame:where(.astro-vrdttmbt){padding-top:calc(var(--sl-nav-height) + var(--sl-mobile-toc-height));padding-inline-start:var(--sl-content-inline-start)}@media (min-width: 50rem){[data-has-sidebar] .header:where(.astro-vrdttmbt){padding-inline-end:var(--sl-nav-pad-x)}.sidebar-pane:where(.astro-vrdttmbt){--sl-sidebar-visibility: visible;width:var(--sl-sidebar-width);background-color:var(--sl-color-bg-sidebar);border-inline-end:1px solid var(--sl-color-hairline-shade)}} .DocSearch-Button{display:flex;align-items:center;gap:.5rem;border:0;background-color:transparent;color:var(--sl-color-gray-1);cursor:pointer;height:2.5rem;font-size:var(--sl-text-xl)}.DocSearch-Button-Container{display:contents}.DocSearch-Search-Icon{width:.875em;height:.875em;stroke-width:.125rem}.DocSearch-Button-Placeholder,.DocSearch-Button-Keys,.DocSearch-Button-Key{display:none}@media (min-width: 50rem){sl-doc-search{width:100%}.DocSearch-Button{border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding-inline-start:.75rem;padding-inline-end:1rem;background-color:var(--sl-color-black);color:var(--sl-color-gray-2);font-size:var(--sl-text-sm);width:100%;max-width:22rem}.DocSearch-Button:hover{border-color:var(--sl-color-gray-2);color:var(--sl-color-white)}.DocSearch-Button-Placeholder,.DocSearch-Button-Keys{display:flex}.DocSearch-Button-Keys{margin-inline-start:auto}.DocSearch-Button-Keys:before{content:"";width:1em;height:1em;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-size:100%;mask-size:100%;background-color:currentColor}} [data-mobile-menu-expanded]{overflow:hidden}@media (min-width: 50rem){[data-mobile-menu-expanded]{overflow:auto}} .hero:where(.astro-jbfsktt5){display:grid;align-items:center;gap:1rem;padding-bottom:1rem}.hero:where(.astro-jbfsktt5)>img:where(.astro-jbfsktt5),.hero:where(.astro-jbfsktt5)>.hero-html:where(.astro-jbfsktt5){-o-object-fit:contain;object-fit:contain;width:min(70%,20rem);height:auto;margin-inline:auto}.stack:where(.astro-jbfsktt5){flex-direction:column;gap:clamp(1.5rem,calc(1.5rem + 1vw),2rem);text-align:center}.copy:where(.astro-jbfsktt5){flex-direction:column;gap:1rem;align-items:center}.copy:where(.astro-jbfsktt5)>:where(.astro-jbfsktt5){max-width:50ch}h1:where(.astro-jbfsktt5){font-size:clamp(var(--sl-text-3xl),calc(.25rem + 5vw),var(--sl-text-6xl));line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)}.tagline:where(.astro-jbfsktt5){font-size:clamp(var(--sl-text-base),calc(.0625rem + 2vw),var(--sl-text-xl));color:var(--sl-color-gray-2)}.actions:where(.astro-jbfsktt5){gap:1rem 2rem;flex-wrap:wrap;justify-content:center}@media (min-width: 50rem){.hero:where(.astro-jbfsktt5){grid-template-columns:7fr 4fr;gap:3%;padding-block:clamp(2.5rem,calc(1rem + 10vmin),10rem)}.hero:where(.astro-jbfsktt5)>img:where(.astro-jbfsktt5),.hero:where(.astro-jbfsktt5)>.hero-html:where(.astro-jbfsktt5){order:2;width:min(100%,25rem)}.stack:where(.astro-jbfsktt5){text-align:start}.copy:where(.astro-jbfsktt5){align-items:flex-start}.actions:where(.astro-jbfsktt5){justify-content:flex-start}} dialog:where(.astro-vjux6bgf){background:transparent;border:0;height:100vh;height:100dvh;margin:0;max-height:none;max-width:none;overflow:hidden;padding:0;position:fixed;width:100vw;width:100dvw}dialog:where(.astro-vjux6bgf)::backdrop{background:var(--starlight-image-zoom-backdrop-bg, var(--sl-color-black));opacity:0}.starlight-image-zoom-opened dialog:where(.astro-vjux6bgf)::backdrop{opacity:1}figure:where(.astro-vjux6bgf){cursor:zoom-out;height:100%;position:relative;width:100%}figure:where(.astro-vjux6bgf) figcaption{background-color:color-mix(in srgb,var(--sl-color-bg-nav),transparent 10%);border-top:1px solid var(--sl-color-hairline);cursor:initial;inset:auto 0 0;opacity:0;padding:var(--sl-nav-pad-y) var(--sl-nav-pad-x);position:absolute}@media (prefers-reduced-transparency){figure:where(.astro-vjux6bgf) figcaption{background-color:var(--sl-color-bg-nav)}}.starlight-image-zoom-opened figure:where(.astro-vjux6bgf) figcaption{opacity:1}button:where(.astro-vjux6bgf){cursor:zoom-out;opacity:0;z-index:1}.starlight-image-zoom-opened button:where(.astro-vjux6bgf){opacity:1}@media (prefers-reduced-motion: no-preference){button:where(.astro-vjux6bgf),dialog:where(.astro-vjux6bgf)::backdrop,figure:where(.astro-vjux6bgf) figcaption{transition:opacity var(--starlight-image-zoom-animation-duration)}} html{.feedback-prompt-content{margin-top:1.5em!important;@media (min-width: 1152px){display:none}}&:not([data-has-toc]){.feedback-prompt-content{display:block}}&[data-has-hero]{.feedback-prompt-content{display:none}}}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper{--icon-size: .75em;--icon-spacing: .25em;line-height:var(--sl-line-height-headings)}.sl-markdown-content:where(.astro-cedpceuv) :not(.heading-wrapper)+:is(.heading-wrapper):not(:where(.not-content *)){margin-top:1.5em}.sl-markdown-content:where(.astro-cedpceuv) .level-h2{font-size:var(--sl-text-h2)}.sl-markdown-content:where(.astro-cedpceuv) .level-h3{font-size:var(--sl-text-h3)}.sl-markdown-content:where(.astro-cedpceuv) .level-h4{font-size:var(--sl-text-h4)}.sl-markdown-content:where(.astro-cedpceuv) .level-h5{font-size:var(--sl-text-h5)}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper>:first-child{margin-inline-end:calc(var(--icon-size) + var(--icon-spacing));display:inline}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{margin-inline-start:calc(-1 * (var(--icon-size)));color:var(--sl-color-gray-3)}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:hover,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:focus{color:var(--sl-color-text-accent)}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper svg{display:inline;width:var(--icon-size)}.sl-markdown-content:where(.astro-cedpceuv) .anchor-link .sr-only{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover: hover){.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{opacity:0}}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper:hover>.anchor-link,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link:focus{opacity:1}@media (min-width: 95em){.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:var(--icon-spacing);margin-inline-start:calc(-1 * (var(--icon-size) + var(--icon-spacing)))}.sl-markdown-content:where(.astro-cedpceuv) .heading-wrapper>:first-child,.sl-markdown-content:where(.astro-cedpceuv) .anchor-link{margin:0}} button:where(.astro-jif73yzw){position:fixed;top:calc((var(--sl-nav-height) - var(--sl-menu-button-size)) / 2);inset-inline-end:var(--sl-nav-pad-x);z-index:var(--sl-z-index-navbar);border:0;border-radius:50%;width:var(--sl-menu-button-size);height:var(--sl-menu-button-size);padding:.5rem;background-color:var(--sl-color-white);color:var(--sl-color-black);box-shadow:var(--sl-shadow-md);cursor:pointer}:where(.astro-jif73yzw)[aria-expanded=true] button:where(.astro-jif73yzw){background-color:var(--sl-color-gray-2);box-shadow:none}[data-theme=light] button:where(.astro-jif73yzw){background-color:var(--sl-color-black);color:var(--sl-color-white)}[data-theme=light] :where(.astro-jif73yzw)[aria-expanded=true] button:where(.astro-jif73yzw){background-color:var(--sl-color-gray-5)} .site-title:where(.astro-m46x6ez3){align-items:center;gap:var(--sl-nav-gap);font-size:var(--sl-text-h4);font-weight:600;color:var(--sl-color-text-accent);text-decoration:none;white-space:nowrap}img:where(.astro-m46x6ez3){height:calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));width:auto;max-width:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:0 50%;object-position:0 50%} :root{--sl-icon-color: var(--sl-color-text)} :root{--starlight-image-zoom-animation-duration: .3s}starlight-image-zoom-zoomable{display:inline-block;position:relative;width:100%}starlight-image-zoom-zoomable img{cursor:zoom-in}starlight-image-zoom-zoomable button{cursor:zoom-in}starlight-image-zoom-zoomable button:not(:focus):not(:focus-within){border:none;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.starlight-image-zoom-control{background-color:var(--sl-color-bg-nav);border:2px solid var(--sl-color-gray-2);border-radius:50%;display:grid;height:44px;inset:20px auto auto 20px;margin-top:0!important;padding:10px;place-items:center;position:absolute;width:44px}:is(.starlight-image-zoom-opened,.starlight-image-zoom-transition) .starlight-image-zoom-control{inset:20px 20px auto auto}.starlight-image-zoom-source{visibility:hidden}.starlight-image-zoom-image{cursor:zoom-out}@media (prefers-reduced-motion: no-preference){.starlight-image-zoom-image{transition:transform var(--starlight-image-zoom-animation-duration) cubic-bezier(.4,0,.2,1)}} .header:where(.astro-kmkmnagf){gap:var(--sl-nav-gap);justify-content:space-between;align-items:center;height:100%}.title-wrapper:where(.astro-kmkmnagf){overflow:hidden}.right-group:where(.astro-kmkmnagf),.social-icons:where(.astro-kmkmnagf){gap:1rem;align-items:center}.social-icons:where(.astro-kmkmnagf):after{content:"";height:2rem;border-inline-end:1px solid var(--sl-color-gray-5)}@media (min-width: 50rem){:root[data-has-sidebar]{--__sidebar-pad: calc(2 * var(--sl-nav-pad-x))}:root:not([data-has-toc]){--__toc-width: 0rem}.header:where(.astro-kmkmnagf){--__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x));--__main-column-fr: calc( ( 100% + var(--__sidebar-pad, 0rem) - var(--__toc-width, var(--sl-sidebar-width)) - (2 * var(--__toc-width, var(--sl-nav-pad-x))) - var(--sl-content-inline-start, 0rem) - var(--sl-content-width) ) / 2 );display:grid;grid-template-columns:minmax(calc(var(--__sidebar-width) + max(0rem,var(--__main-column-fr) - var(--sl-nav-gap))),auto) 1fr auto;align-content:center}} :root{--sl-badge-default-border: var(--sl-color-accent);--sl-badge-default-bg: var(--sl-color-accent-low);--sl-badge-default-text: #fff;--sl-badge-note-border: var(--sl-color-blue);--sl-badge-note-bg: var(--sl-color-blue-low);--sl-badge-note-text: #fff;--sl-badge-danger-border: var(--sl-color-red);--sl-badge-danger-bg: var(--sl-color-red-low);--sl-badge-danger-text: #fff;--sl-badge-success-border: var(--sl-color-green);--sl-badge-success-bg: var(--sl-color-green-low);--sl-badge-success-text: #fff;--sl-badge-caution-border: var(--sl-color-orange);--sl-badge-caution-bg: var(--sl-color-orange-low);--sl-badge-caution-text: #fff;--sl-badge-tip-border: var(--sl-color-purple);--sl-badge-tip-bg: var(--sl-color-purple-low);--sl-badge-tip-text: #fff}[data-theme=light]:root{--sl-badge-default-bg: var(--sl-color-accent-high);--sl-badge-note-bg: var(--sl-color-blue-high);--sl-badge-danger-bg: var(--sl-color-red-high);--sl-badge-success-bg: var(--sl-color-green-high);--sl-badge-caution-bg: var(--sl-color-orange-high);--sl-badge-tip-bg: var(--sl-color-purple-high)}.sl-badge:where(.astro-avdet4wd){display:inline-block;border:1px solid var(--sl-color-border-badge);border-radius:.25rem;font-family:var(--sl-font-system-mono);line-height:normal;color:var(--sl-color-text-badge);background-color:var(--sl-color-bg-badge);overflow-wrap:anywhere}.sidebar-content .sl-badge:where(.astro-avdet4wd){line-height:1;font-size:var(--sl-text-xs);padding:.125rem .375rem}.sidebar-content a[aria-current=page]>.sl-badge:where(.astro-avdet4wd){--sl-color-bg-badge: transparent;--sl-color-border-badge: currentColor;color:inherit}.default:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-default-bg);--sl-color-border-badge: var(--sl-badge-default-border);--sl-color-text-badge: var(--sl-badge-default-text)}.note:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-note-bg);--sl-color-border-badge: var(--sl-badge-note-border);--sl-color-text-badge: var(--sl-badge-note-text)}.danger:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-danger-bg);--sl-color-border-badge: var(--sl-badge-danger-border);--sl-color-text-badge: var(--sl-badge-danger-text)}.success:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-success-bg);--sl-color-border-badge: var(--sl-badge-success-border);--sl-color-text-badge: var(--sl-badge-success-text)}.tip:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-tip-bg);--sl-color-border-badge: var(--sl-badge-tip-border);--sl-color-text-badge: var(--sl-badge-tip-text)}.caution:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-caution-bg);--sl-color-border-badge: var(--sl-badge-caution-border);--sl-color-text-badge: var(--sl-badge-caution-text)}.small:where(.astro-avdet4wd){font-size:var(--sl-text-xs);padding:.125rem .25rem}.medium:where(.astro-avdet4wd){font-size:var(--sl-text-sm);padding:.175rem .35rem}.large:where(.astro-avdet4wd){font-size:var(--sl-text-base);padding:.225rem .45rem}.sl-markdown-content :is(h1,h2,h3,h4,h5,h6) .sl-badge:where(.astro-avdet4wd){vertical-align:middle} .card-grid:where(.astro-zntqmydn){display:grid;grid-template-columns:100%;gap:1rem}.card-grid:where(.astro-zntqmydn)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-zntqmydn){grid-template-columns:1fr 1fr;gap:1.5rem}.stagger:where(.astro-zntqmydn){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-zntqmydn)>*:nth-child(2n){transform:translateY(var(--stagger-height))}} .card:where(.astro-v5tidmuc){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-v5tidmuc):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-v5tidmuc):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-v5tidmuc):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-v5tidmuc):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-v5tidmuc){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.card:where(.astro-v5tidmuc) .icon:where(.astro-v5tidmuc){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-v5tidmuc) .body:where(.astro-v5tidmuc){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))} label:where(.astro-4yphtoen){--sl-label-icon-size: .875rem;--sl-caret-size: 1.25rem;--sl-inline-padding: .5rem;position:relative;display:flex;align-items:center;gap:.25rem;color:var(--sl-color-gray-1)}label:where(.astro-4yphtoen):hover{color:var(--sl-color-gray-2)}.icon:where(.astro-4yphtoen){position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}.label-icon:where(.astro-4yphtoen){font-size:var(--sl-label-icon-size);inset-inline-start:0}.caret:where(.astro-4yphtoen){font-size:var(--sl-caret-size);inset-inline-end:0}select:where(.astro-4yphtoen){border:0;padding-block:.625rem;padding-inline:calc(var(--sl-label-icon-size) + var(--sl-inline-padding) + .25rem) calc(var(--sl-caret-size) + var(--sl-inline-padding) + .25rem);margin-inline:calc(var(--sl-inline-padding) * -1);width:calc(var(--sl-select-width) + var(--sl-inline-padding) * 2);background-color:transparent;text-overflow:ellipsis;color:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}option:where(.astro-4yphtoen){background-color:var(--sl-color-bg-nav);color:var(--sl-color-gray-1)}@media (min-width: 50rem){select:where(.astro-4yphtoen){font-size:var(--sl-text-sm)}} .right-sidebar-panel:where(.astro-pb3aqygn){padding:1rem var(--sl-sidebar-pad-x)}.sl-container:where(.astro-pb3aqygn){width:calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x))}.right-sidebar-panel:where(.astro-pb3aqygn) h2{color:var(--sl-color-white);font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);margin-bottom:.5rem}.right-sidebar-panel:where(.astro-pb3aqygn) :where(a){display:block;font-size:var(--sl-text-xs);text-decoration:none;color:var(--sl-color-gray-3);overflow-wrap:anywhere}.right-sidebar-panel:where(.astro-pb3aqygn) :where(a):hover{color:var(--sl-color-white)}@media (min-width: 72rem){.sl-container:where(.astro-pb3aqygn){max-width:calc(((100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 * var(--sl-sidebar-pad-x)) * .25))}} h1:where(.astro-j6tvhyss){margin-top:1rem;font-size:var(--sl-text-h1);line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)} ul:where(.astro-g2bywc46){padding:0;list-style:none}a:where(.astro-g2bywc46){--pad-inline: .5rem;display:block;border-radius:.25rem;padding-block:.25rem;padding-inline:calc(1rem * var(--depth) + var(--pad-inline)) var(--pad-inline);line-height:1.25}a:where(.astro-g2bywc46)[aria-current=true]{color:var(--sl-color-text-accent)}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46){--pad-inline: 1rem;display:flex;justify-content:space-between;gap:var(--pad-inline);border-top:1px solid var(--sl-color-gray-6);border-radius:0;padding-block:.5rem;color:var(--sl-color-text);font-size:var(--sl-text-sm);text-decoration:none;outline-offset:var(--sl-outline-offset-inside)}.isMobile:where(.astro-g2bywc46):first-child>li:where(.astro-g2bywc46):first-child>a:where(.astro-g2bywc46){border-top:0}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true],.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:hover,.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:focus{color:var(--sl-color-white);background-color:unset}.isMobile:where(.astro-g2bywc46) a:where(.astro-g2bywc46)[aria-current=true]:after{content:"";width:1rem;background-color:var(--sl-color-text-accent);-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCc+PHBhdGggZD0nTTEwLjkxNCA0LjIwNmEuNTgzLjU4MyAwIDAgMC0uODI4IDBMNS43NCA4LjU1NyAzLjkxNCA2LjcyNmEuNTk2LjU5NiAwIDAgMC0uODI4Ljg1N2wyLjI0IDIuMjRhLjU4My41ODMgMCAwIDAgLjgyOCAwbDQuNzYtNC43NmEuNTgzLjU4MyAwIDAgMCAwLS44NTdaJy8+PC9zdmc+Cg==);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCc+PHBhdGggZD0nTTEwLjkxNCA0LjIwNmEuNTgzLjU4MyAwIDAgMC0uODI4IDBMNS43NCA4LjU1NyAzLjkxNCA2LjcyNmEuNTk2LjU5NiAwIDAgMC0uODI4Ljg1N2wyLjI0IDIuMjRhLjU4My41ODMgMCAwIDAgLjgyOCAwbDQuNzYtNC43NmEuNTgzLjU4MyAwIDAgMCAwLS44NTdaJy8+PC9zdmc+Cg==);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;flex-shrink:0} nav:where(.astro-doynk5tl){position:fixed;z-index:var(--sl-z-index-toc);top:calc(var(--sl-nav-height) - 1px);inset-inline:0;border-top:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-bg-nav)}@media (min-width: 50rem){nav:where(.astro-doynk5tl){inset-inline-start:var(--sl-content-inline-start, 0)}}summary:where(.astro-doynk5tl){gap:.5rem;align-items:center;height:var(--sl-mobile-toc-height);border-bottom:1px solid var(--sl-color-hairline-shade);padding:.5rem 1rem;font-size:var(--sl-text-xs);outline-offset:var(--sl-outline-offset-inside)}summary:where(.astro-doynk5tl)::marker,summary:where(.astro-doynk5tl)::-webkit-details-marker{display:none}.toggle:where(.astro-doynk5tl){flex-shrink:0;gap:1rem;align-items:center;justify-content:space-between;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding-block:.5rem;padding-inline-start:.75rem;padding-inline-end:.5rem;line-height:1;background-color:var(--sl-color-black);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}details:where(.astro-doynk5tl)[open] .toggle:where(.astro-doynk5tl){color:var(--sl-color-white);border-color:var(--sl-color-accent)}details:where(.astro-doynk5tl) .toggle:where(.astro-doynk5tl):hover{color:var(--sl-color-white);border-color:var(--sl-color-gray-2)}[dir=rtl] .caret:where(.astro-doynk5tl){transform:rotate(180deg)}details:where(.astro-doynk5tl)[open] .caret:where(.astro-doynk5tl){transform:rotate(90deg)}.display-current:where(.astro-doynk5tl){white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--sl-color-white)}.dropdown:where(.astro-doynk5tl){--border-top: 1px;margin-top:calc(-1 * var(--border-top));border:var(--border-top) solid var(--sl-color-gray-6);border-top-color:var(--sl-color-hairline-shade);max-height:calc(85vh - var(--sl-nav-height) - var(--sl-mobile-toc-height));overflow-y:auto;background-color:var(--sl-color-black);box-shadow:var(--sl-shadow-md);overscroll-behavior:contain} a:where(.astro-wy4te6ga){color:var(--sl-color-text-accent);padding:.5em;margin:-.5em}a:where(.astro-wy4te6ga):hover{opacity:.66} .c-breadcrumbs{--color-link-breadcrumbs: inherit;--size-font-breadcrumbs: 1rem;--spacing-vertical-separator-breadcrumbs: 6px}.c-breadcrumbs .has-ellipsis{display:var(--display-ellipsis-breadcrumbs, none)}.c-breadcrumbs.is-truncated .has-ellipsis{--display-ellipsis-breadcrumbs: flex}.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb{visibility:var(--visibility-truncated-breadcrumbs, hidden);position:var(--position-truncated-breadcrumbs, absolute)}.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb:first-of-type,.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb:last-of-type,.c-breadcrumbs.is-truncated .c-breadcrumbs__crumb.has-ellipsis{--visibility-truncated-breadcrumbs: visible;--position-truncated-breadcrumbs: relative}.c-breadcrumbs__truncated-button{background-color:transparent;border:none;padding:0;margin:0;cursor:pointer;color:var(--color-truncated-button, var(--color-link-breadcrumbs))}.c-breadcrumbs__crumbs{list-style-type:none;margin:0;padding:0;display:flex;flex-wrap:wrap}.c-breadcrumbs__crumbs:where(.has-no-separators){row-gap:var(--spacing-vertical-separator-breadcrumbs);-moz-column-gap:1rem;column-gap:1rem}.c-breadcrumbs__crumb{display:flex;align-items:center}.c-breadcrumbs__crumb:has(.c-breadcrumbs__separator) .c-breadcrumbs__separator{display:flex;align-items:center;justify-content:center;margin-inline:var(--spacing-vertical-separator-breadcrumbs)}.c-breadcrumbs__crumb:has(svg,image) :where(svg,image){max-width:var(--size-font-breadcrumbs);max-height:var(--size-font-breadcrumbs)}.c-breadcrumbs__link,.c-breadcrumbs__truncated-button{font-size:var(--size-font-breadcrumbs);text-decoration:none;color:var(--color-link-breadcrumbs);line-height:1} svg:where(.astro-c6vsoqas){color:var(--sl-icon-color);font-size:var(--sl-icon-size, 1em);width:1em;height:1em} a:where(.astro-7q3lir66){clip:rect(0,0,0,0);position:fixed;top:.75rem;inset-inline-start:.75rem}a:where(.astro-7q3lir66):focus{clip:unset;z-index:var(--sl-z-index-skiplink);display:block;padding:.5rem 1rem;text-decoration:none;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent);box-shadow:var(--sl-shadow-lg)} .main-pane:where(.astro-67yu43on){isolation:isolate}@media (min-width: 72rem){.right-sidebar-container:where(.astro-67yu43on){order:2;position:relative;width:calc(var(--sl-sidebar-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2)}.right-sidebar:where(.astro-67yu43on){position:fixed;top:0;border-inline-start:1px solid var(--sl-color-gray-6);padding-top:var(--sl-nav-height);width:100%;height:100vh;overflow-y:auto;scrollbar-width:none}.main-pane:where(.astro-67yu43on){width:100%}[data-has-sidebar][data-has-toc] .main-pane:where(.astro-67yu43on){--sl-content-margin-inline: auto 0;order:1;width:calc(var(--sl-content-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2)}} .starlight-aside{padding:1rem;border-inline-start:.25rem solid var(--sl-color-asides-border);color:var(--sl-color-white)}.starlight-aside--note{--sl-color-asides-text-accent: var(--sl-color-blue-high);--sl-color-asides-border: var(--sl-color-blue);background-color:var(--sl-color-blue-low)}.starlight-aside--tip{--sl-color-asides-text-accent: var(--sl-color-purple-high);--sl-color-asides-border: var(--sl-color-purple);background-color:var(--sl-color-purple-low)}.starlight-aside--caution{--sl-color-asides-text-accent: var(--sl-color-orange-high);--sl-color-asides-border: var(--sl-color-orange);background-color:var(--sl-color-orange-low)}.starlight-aside--danger{--sl-color-asides-text-accent: var(--sl-color-red-high);--sl-color-asides-border: var(--sl-color-red);background-color:var(--sl-color-red-low)}.starlight-aside__title{display:flex;gap:.5rem;align-items:center;font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);color:var(--sl-color-asides-text-accent)}.starlight-aside__icon{font-size:1.333em;width:1em;height:1em}.starlight-aside__title+.starlight-aside__content{margin-top:.5rem}.starlight-aside__content a{color:var(--sl-color-asides-text-accent)} sl-sidebar-state-persist:where(.astro-kku4brbg){display:contents} :root{.sidebar-content{--sl-color-hairline-light: #cacaca !important;>*{a{padding:.2375em var(--sl-sidebar-item-padding-inline)!important;&[aria-current=page]{background-color:unset!important;border:unset!important;border-color:unset!important;color:var(--sl-color-accent)!important;font-weight:600!important}}summary{padding:.1375em var(--sl-sidebar-item-padding-inline)!important}.large{color:var(--sl-color-gray-2)!important;font-weight:unset!important;font-size:unset!important;@media (min-width: 50rem){font-size:var(--sl-text-sm)!important}}.caret{font-size:1rem!important}}}}:root[data-theme=dark]{.sidebar-content{--sl-color-hairline-light: #444444 !important}} .starlight-aside{border:unset;border-radius:4px;&.starlight-aside--note{background-color:#ecf4ff}&.starlight-aside--caution{background-color:#fff8e4}.starlight-aside__title{margin-left:30px;svg{margin-left:-30px}}.starlight-aside__content{margin-top:unset;margin-left:30px}}:root[data-theme=dark]{.starlight-aside--note{background-color:#001c43}.starlight-aside--caution{background-color:#62490a}} .social-icons:where(.astro-wu23bvmt){margin-inline-end:auto;gap:1rem;align-items:center;padding-block:1rem}.social-icons:where(.astro-wu23bvmt):empty{display:none}.mobile-preferences:where(.astro-wu23bvmt){justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--sl-color-gray-6);-moz-column-gap:1rem;column-gap:1rem;padding:.5rem 0} starlight-tabs:where(.astro-esqgolmp){display:block}.tablist-wrapper:where(.astro-esqgolmp){overflow-x:auto}:where(.astro-esqgolmp)[role=tablist]{display:flex;list-style:none;border-bottom:2px solid var(--sl-color-gray-5);padding:0}.tab:where(.astro-esqgolmp){margin-bottom:-2px}.tab:where(.astro-esqgolmp)>:where(.astro-esqgolmp)[role=tab]{display:flex;align-items:center;gap:.5rem;padding:0 1.25rem;text-decoration:none;border-bottom:2px solid var(--sl-color-gray-5);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial}.tab:where(.astro-esqgolmp) :where(.astro-esqgolmp)[role=tab][aria-selected=true]{color:var(--sl-color-white);border-color:var(--sl-color-text-accent);font-weight:600}.tablist-wrapper:where(.astro-esqgolmp)~[role=tabpanel]{margin-top:1rem} :root{--sl-text-h4: var(--sl-text-base);--sl-text-h5: var(--sl-text-base)} html:not([data-has-toc]){--sl-mobile-toc-height: 0rem}html:not([data-has-sidebar]){--sl-content-width: 67.5rem}html{scroll-padding-top:calc(1.5rem + var(--sl-nav-height) + var(--sl-mobile-toc-height))}main:where(.astro-bguv2lll){padding-bottom:3vh}@media (min-width: 50em){:where(.astro-bguv2lll)[data-has-sidebar]{--sl-content-inline-start: var(--sl-sidebar-width)}}@media (min-width: 72em){html{scroll-padding-top:calc(1.5rem + var(--sl-nav-height))}} .sl-link-card:where(.astro-mf7fz2mj){display:grid;grid-template-columns:1fr auto;gap:.5rem;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding:1rem;box-shadow:var(--sl-shadow-sm);position:relative}a:where(.astro-mf7fz2mj){text-decoration:none;line-height:var(--sl-line-height-headings)}a:where(.astro-mf7fz2mj):before{content:"";position:absolute;inset:0}.stack:where(.astro-mf7fz2mj){flex-direction:column;gap:.5rem}.title:where(.astro-mf7fz2mj){color:var(--sl-color-white);font-weight:600;font-size:var(--sl-text-lg)}.description:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3);line-height:1.5}.icon:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3)}.sl-link-card:where(.astro-mf7fz2mj):hover{background:var(--sl-color-gray-7, var(--sl-color-gray-6));border-color:var(--sl-color-gray-2)}.sl-link-card:where(.astro-mf7fz2mj):hover .icon:where(.astro-mf7fz2mj){color:var(--sl-color-white)} input,select{background-color:var(--sl-color-bg-nav);border-color:var(--sl-color-gray-5);border-width:2px}input[readonly]{background-color:var(--sl-color-backdrop-overlay);cursor:not-allowed} .sl-steps{--bullet-size: calc(var(--sl-line-height) * 1rem);--bullet-margin: .375rem;list-style:none;counter-reset:steps-counter var(--sl-steps-start, 0);padding-inline-start:0}.sl-steps>li{counter-increment:steps-counter;position:relative;padding-inline-start:calc(var(--bullet-size) + 1rem);padding-bottom:1px;min-height:calc(var(--bullet-size) + var(--bullet-margin))}.sl-steps>li+li{margin-top:0}.sl-steps>li:before{content:counter(steps-counter);position:absolute;top:0;inset-inline-start:0;width:var(--bullet-size);height:var(--bullet-size);line-height:var(--bullet-size);font-size:var(--sl-text-xs);font-weight:600;text-align:center;color:var(--sl-color-white);background-color:var(--sl-color-gray-6);border-radius:99rem;box-shadow:inset 0 0 0 1px var(--sl-color-gray-5)}.sl-steps>li:after{--guide-width: 1px;content:"";position:absolute;top:calc(var(--bullet-size) + var(--bullet-margin));bottom:var(--bullet-margin);inset-inline-start:calc((var(--bullet-size) - var(--guide-width)) / 2);width:var(--guide-width);background-color:var(--sl-color-hairline-light)}.sl-steps>li>:first-child{--lh: calc(1em * var(--sl-line-height));--shift-y: calc(.5 * (var(--bullet-size) - var(--lh)));transform:translateY(var(--shift-y));margin-bottom:var(--shift-y)}.sl-steps>li>:first-child:where(h1,h2,h3,h4,h5,h6){--lh: calc(1em * var(--sl-line-height-headings))}@supports (--prop: 1lh){.sl-steps>li>:first-child{--lh: 1lh}} kbd{border:1px solid rgb(251 146 60);border-radius:.25rem;background-color:#fb923c1a;padding:.1rem} starlight-file-tree:where(.astro-p67cqifm){--x-space: 1.5rem;--y-space: .125rem;--y-pad: 0;display:block;border:1px solid var(--sl-color-gray-5);padding:1rem;background-color:var(--sl-color-gray-6);font-size:var(--sl-text-xs);font-family:var(--__sl-font-mono);overflow-x:auto}starlight-file-tree:where(.astro-p67cqifm) .directory>details{border:0;padding:0;padding-inline-start:var(--x-space);background:transparent}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary{margin-inline-start:calc(-1 * var(--x-space));border:0;padding:var(--y-pad) .625rem;font-weight:400;color:var(--sl-color-white);max-width:100%}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::marker,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::-webkit-details-marker{color:var(--sl-color-gray-3)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .tree-icon{cursor:pointer;color:var(--sl-color-text-accent);fill:var(--sl-color-text-accent)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover~ul{border-color:var(--sl-color-gray-4)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .highlight .tree-icon{fill:var(--sl-color-text-invert)}starlight-file-tree:where(.astro-p67cqifm) ul{margin-inline-start:.5rem;border-inline-start:1px solid var(--sl-color-gray-5);padding:0;padding-inline-start:.125rem;list-style:none}starlight-file-tree:where(.astro-p67cqifm)>ul{margin:0;border:0;padding:0}starlight-file-tree:where(.astro-p67cqifm) li{margin:var(--y-space) 0;padding:var(--y-pad) 0}starlight-file-tree:where(.astro-p67cqifm) .file{margin-inline-start:calc(var(--x-space) - .125rem);color:var(--sl-color-white)}starlight-file-tree:where(.astro-p67cqifm) .tree-entry{display:inline-flex;align-items:flex-start;flex-wrap:wrap;max-width:calc(100% - 1rem)}@media (min-width: 30em){starlight-file-tree:where(.astro-p67cqifm) .tree-entry{flex-wrap:nowrap}}starlight-file-tree:where(.astro-p67cqifm) .tree-entry>:first-child{flex-shrink:0}starlight-file-tree:where(.astro-p67cqifm) .empty{color:var(--sl-color-gray-3);padding-inline-start:.375rem}starlight-file-tree:where(.astro-p67cqifm) .comment{color:var(--sl-color-gray-3);padding-inline-start:1.625rem;max-width:24rem;min-width:12rem}starlight-file-tree:where(.astro-p67cqifm) .highlight{display:inline-block;border-radius:.25rem;padding-inline-end:.5rem;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent)}starlight-file-tree:where(.astro-p67cqifm) svg{display:inline;fill:var(--sl-color-gray-3);vertical-align:middle;margin-inline:.25rem .375rem;width:.875rem;height:.875rem}starlight-file-tree:where(.astro-p67cqifm) .highlight svg.tree-icon{fill:var(--sl-color-text-invert)} ul:where(.astro-3ii7xxms){--sl-sidebar-item-padding-inline: .5rem;list-style:none;padding:0}li:where(.astro-3ii7xxms){overflow-wrap:anywhere}ul:where(.astro-3ii7xxms) ul:where(.astro-3ii7xxms) li:where(.astro-3ii7xxms){margin-inline-start:var(--sl-sidebar-item-padding-inline);border-inline-start:1px solid var(--sl-color-hairline-light);padding-inline-start:var(--sl-sidebar-item-padding-inline)}.large:where(.astro-3ii7xxms){font-size:var(--sl-text-lg);font-weight:600;color:var(--sl-color-white)}.top-level:where(.astro-3ii7xxms)>li:where(.astro-3ii7xxms)+li:where(.astro-3ii7xxms){margin-top:.75rem}summary:where(.astro-3ii7xxms){display:flex;align-items:center;justify-content:space-between;padding:.2em var(--sl-sidebar-item-padding-inline);line-height:1.4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}summary:where(.astro-3ii7xxms)::marker,summary:where(.astro-3ii7xxms)::-webkit-details-marker{display:none}.caret:where(.astro-3ii7xxms){transition:transform .2s ease-in-out;flex-shrink:0}[dir=rtl] .caret:where(.astro-3ii7xxms){transform:rotate(180deg)}:where(.astro-3ii7xxms)[open]>summary:where(.astro-3ii7xxms) .caret:where(.astro-3ii7xxms){transform:rotate(90deg)}a:where(.astro-3ii7xxms){display:block;border-radius:.25rem;text-decoration:none;color:var(--sl-color-gray-2);padding:.3em var(--sl-sidebar-item-padding-inline);line-height:1.4}a:where(.astro-3ii7xxms):hover,a:where(.astro-3ii7xxms):focus{color:var(--sl-color-white)}:where(.astro-3ii7xxms)[aria-current=page],:where(.astro-3ii7xxms)[aria-current=page]:hover,:where(.astro-3ii7xxms)[aria-current=page]:focus{font-weight:600;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent)}a:where(.astro-3ii7xxms)>:where(.astro-3ii7xxms):not(:last-child),.group-label:where(.astro-3ii7xxms)>:where(.astro-3ii7xxms):not(:last-child){margin-inline-end:.25em}@media (min-width: 50rem){.top-level:where(.astro-3ii7xxms)>li:where(.astro-3ii7xxms)+li:where(.astro-3ii7xxms){margin-top:.5rem}.large:where(.astro-3ii7xxms){font-size:var(--sl-text-base)}a:where(.astro-3ii7xxms){font-size:var(--sl-text-sm)}} :root{--color-link-breadcrumbs: var(--sl-color-text-accent)} .littlefoot{--popover-font-family: var(--sl-font-system);--popover-background-color: var(--sl-color-bg);--popover-text-color: var(--sl-color-white)}.littlefoot__content>p>a{color:var(--sl-color-text-accent)}.data-footnote-backref{display:none} .sl-link-button:where(.astro-xwgiixxa){align-items:center;border:1px solid transparent;border-radius:999rem;display:inline-flex;font-size:var(--sl-text-sm);gap:.5em;line-height:1.1875;outline-offset:.25rem;padding:.4375rem 1.125rem;text-decoration:none}.sl-link-button:where(.astro-xwgiixxa).primary{background:var(--sl-color-text-accent);border-color:var(--sl-color-text-accent);color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).primary:hover{color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).secondary{border-color:inherit;color:var(--sl-color-white)}.sl-link-button:where(.astro-xwgiixxa).minimal{color:var(--sl-color-white);padding-inline:0}.sl-link-button:where(.astro-xwgiixxa) svg{flex-shrink:0}@media (min-width: 50rem){.sl-link-button:where(.astro-xwgiixxa){font-size:var(--sl-text-base);padding:.9375rem 1.25rem}}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa){margin-inline-end:1rem}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa):not(:where(p *)){margin-block:1rem} pre.mermaid:not([data-processed]){visibility:hidden} table *{overflow-wrap:normal} </style> <link rel="stylesheet" href="/_astro/tailwind.CD_bkva8.css"> <style>.site-title{gap:calc(.5 * var(--sl-nav-gap));span{color:var(--sl-color-white)}img{height:calc(var(--sl-nav-height) - 3 * var(--sl-nav-pad-y))}} fieldset:where(.astro-x6kpz2mu){padding-top:0;padding-left:0}label:where(.astro-x6kpz2mu){font-size:small;color:var(--sl-color-gray-3)}input:where(.astro-x6kpz2mu)::-moz-placeholder{font-size:x-small}input:where(.astro-x6kpz2mu)[type=submit],input:where(.astro-x6kpz2mu)::placeholder{font-size:x-small}h2:where(.astro-x6kpz2mu){color:var(--sl-color-white);font-size:var(--sl-text-h5);font-weight:600;line-height:var(--sl-line-height-headings);margin-bottom:.5rem}#info:where(.astro-x6kpz2mu){display:none}#other:where(.astro-x6kpz2mu):checked~#info:where(.astro-x6kpz2mu){display:flex}:where(.astro-x6kpz2mu)[data-icon]{cursor:pointer;color:var(--sl-color-gray-3);font-size:1.5rem;margin-right:.5rem;&:hover{color:var(--sl-color-text-accent);border-color:var(--sl-color-text-accent)}} </style> <link rel="stylesheet" href="/_astro/tooltips.CEnw8Nk_.css"> <style>.hero:where(.astro-opidluyl){display:grid;align-items:center;gap:1rem;padding-bottom:1rem}.hero:where(.astro-opidluyl)>img:where(.astro-opidluyl),.hero:where(.astro-opidluyl)>.hero-html:where(.astro-opidluyl){-o-object-fit:contain;object-fit:contain;width:min(70%,20rem);height:auto;margin-inline:auto}.stack:where(.astro-opidluyl){flex-direction:column;gap:clamp(1.5rem,calc(1.5rem + 1vw),2rem);text-align:center}.copy:where(.astro-opidluyl){flex-direction:column;gap:1rem;align-items:center}a:where(.astro-opidluyl){color:var(--sl-color-white)}h1:where(.astro-opidluyl){font-size:clamp(var(--sl-text-3xl),calc(.25rem + 5vw),var(--sl-text-6xl));line-height:var(--sl-line-height-headings);font-weight:600;color:var(--sl-color-white)}.tagline:where(.astro-opidluyl){font-size:clamp(var(--sl-text-base),calc(.0625rem + 2vw),var(--sl-text-xl));color:var(--sl-color-gray-2)}.actions:where(.astro-opidluyl){gap:1rem 2rem;flex-wrap:wrap;justify-content:center}.copy:where(.astro-opidluyl)>.links:where(.astro-opidluyl){gap:0;flex-direction:row;flex-wrap:wrap}@media (min-width: 50rem){.hero:where(.astro-opidluyl){grid-template-columns:7fr 4fr;gap:3%;padding-block:clamp(2.5rem,calc(1rem + 10vmin),10rem)}.hero:where(.astro-opidluyl)>img:where(.astro-opidluyl),.hero:where(.astro-opidluyl)>.hero-html:where(.astro-opidluyl){order:2;width:min(100%,25rem)}.stack:where(.astro-opidluyl){text-align:start}.copy:where(.astro-opidluyl){align-items:flex-start}.actions:where(.astro-opidluyl){justify-content:flex-start}} .NetworkMap--land:where(.astro-x5fqlrwg){fill:rgba(var(--gray-7-rgb),.8)}:where(.astro-x5fqlrwg)[theme=dark] .NetworkMap--land:where(.astro-x5fqlrwg){fill:rgba(var(--gray-2-rgb),.7)}.NetworkMap--datacenters:where(.astro-x5fqlrwg){fill:var(--sl-color-text-accent);stroke:var(--sl-color-text-accent);stroke-width:2px;paint-order:stroke;opacity:.85}:where(.astro-x5fqlrwg)[theme=dark] .NetworkMap--datacenters:where(.astro-x5fqlrwg){stroke:var(--background-color);stroke-width:3px} .card:where(.astro-rcyev3ef){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-rcyev3ef):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-rcyev3ef):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-rcyev3ef):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-rcyev3ef):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-rcyev3ef){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.title:where(.astro-rcyev3ef)>a:where(.astro-rcyev3ef){color:var(--sl-color-white)!important;text-decoration-color:var(--sl-color-accent)!important}.card:where(.astro-rcyev3ef) .icon:where(.astro-rcyev3ef){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-rcyev3ef) .body:where(.astro-rcyev3ef){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))} a:where(.astro-vdgantbb){color:var(--sl-color-text-accent)} </style> <link rel="stylesheet" href="/_astro/WorkersIsolateDiagram_astro_astro_type_style_index_0_lang.Bc7tm2R7.css"> <style>.card-grid:where(.astro-lrh2lqny){display:grid;gap:1rem}.card-grid:where(.astro-lrh2lqny)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-lrh2lqny){grid-template-columns:1fr 1fr 1fr 1fr;gap:1.5rem}.stagger:where(.astro-lrh2lqny){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-lrh2lqny)>*:nth-child(2n){transform:translateY(var(--stagger-height))}} .link-list:where(.astro-5tgmqq4m) ul{list-style-type:none;padding:0}.link-list:where(.astro-5tgmqq4m) li{border-bottom:1px solid var(--sl-color-gray-6);padding:.25rem 0;margin:0!important}.link-list:where(.astro-5tgmqq4m) li:last-child{border-bottom:none}.link-list:where(.astro-5tgmqq4m) a{display:flex;gap:.5rem;justify-content:space-between;align-items:center;text-decoration:none}.link-list:where(.astro-5tgmqq4m) a:after{content:"";background-color:currentColor;width:1rem;height:1rem;flex-shrink:0;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z'%3E%3C/path%3E%3C/svg%3E");mask-size:100%;-webkit-mask-size:100%}[dir=rtl] .link-list:where(.astro-5tgmqq4m) a:after:not(:where([dir=rtl] [dir=ltr] *)){transform:scaleX(-1)} </style> <link rel="stylesheet" href="/_astro/FooterHeroBlock_astro_astro_type_style_index_0_lang.C0EyG241.css"> <style>input:where(.astro-75f4fhkp)[type=radio]{display:none}:root{--active-background: rgb(46 105 255);--hover-background: rgb(46 105 255 / .5);--active-text-color: white}:root[data-theme=dark]{--active-background: rgb(246 130 31);--hover-background: rgb(246 130 31 / .5);--active-text-color: black}#section1:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section1Content:where(.astro-75f4fhkp),#section2:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section2Content:where(.astro-75f4fhkp),#section3:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section3Content:where(.astro-75f4fhkp),#section4:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section4Content:where(.astro-75f4fhkp),#section5:where(.astro-75f4fhkp):checked~.tryit-code:where(.astro-75f4fhkp) #section5Content:where(.astro-75f4fhkp){display:block}#section1:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section1Label:where(.astro-75f4fhkp),#section2:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section2Label:where(.astro-75f4fhkp),#section3:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section3Label:where(.astro-75f4fhkp),#section4:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section4Label:where(.astro-75f4fhkp),#section5:where(.astro-75f4fhkp):checked~.tryit-sidebar:where(.astro-75f4fhkp) #section5Label:where(.astro-75f4fhkp){background-color:var(--active-background);color:var(--active-text-color)}.tryit-sidebar:where(.astro-75f4fhkp) label:where(.astro-75f4fhkp):hover{background-color:var(--hover-background)} </style> <script type="module" src="/_astro/page.7qqag-5g.js"></script> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="en"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=corsproxy" data-sourceurl="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/exm=corsproxy/ed=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/"></script> <meta name="robots" content="none"> </head> <body class="astro-bguv2lll"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=navigationui" data-environment="prod" data-proxy-url="https://developers-cloudflare-com.translate.goog" data-proxy-full-url="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" data-source-url="https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/" data-source-language="pl" data-target-language="en" data-display-language="en-GB" data-detected-source-language="" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/&amp;anno=2" data-client="tr"></script><!-- Keep the default skip link in place --><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#_top" class="astro-7q3lir66">Skip to content</a> <div class="page sl-flex astro-vrdttmbt"> <header class="header astro-vrdttmbt"> <div class="header sl-flex astro-kmkmnagf"> <div class="title-wrapper sl-flex astro-kmkmnagf"><a href="https://developers-cloudflare-com.translate.goog/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="site-title sl-flex astro-m46x6ez3"> <img class="astro-m46x6ez3" alt="" src="/_astro/logo.p_ySeMR1.svg" width="40" height="19"> <span class="astro-m46x6ez3"> Cloudflare Docs </span> </a> </div> <div class="sl-flex astro-kmkmnagf"><sl-doc-search data-translations="{&quot;placeholder&quot;:&quot;Search&quot;,&quot;translations&quot;:{&quot;button&quot;:{&quot;buttonText&quot;:&quot;Search&quot;,&quot;buttonAriaLabel&quot;:&quot;Search&quot;},&quot;modal&quot;:{&quot;searchBox&quot;:{},&quot;startScreen&quot;:{},&quot;errorScreen&quot;:{},&quot;footer&quot;:{},&quot;noResultsScreen&quot;:{}}}}"> <button type="button" class="DocSearch DocSearch-Button" aria-label="Search"> <span class="DocSearch-Button-Container"> <svg width="20" height="20" class="DocSearch-Search-Icon" viewbox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /> </svg><span class="DocSearch-Button-Placeholder">Search</span> </span> <span class="DocSearch-Button-Keys"></span> </button> </sl-doc-search> <script type="module" src="/_astro/DocSearch.astro_astro_type_script_index_0_lang.CycYJ8Jr.js"></script> </div> <div class="sl-hidden md:sl-flex right-group astro-kmkmnagf"> <div class="sl-flex social-icons astro-kmkmnagf"> <div class="items-center hidden lg:flex mx-auto astro-r3tjzkat"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Products</span> </a><a href="https://developers-cloudflare-com.translate.goog/learning-paths/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Learning</span> </a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://www.cloudflarestatus.com/" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Status</span> </a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Support</span> </a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://dash.cloudflare.com" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Log in</span> </a> </div><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://github.com/cloudflare/cloudflare-docs" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z" /> </svg></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://x.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">X</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M 18.242188 2.25 L 21.554688 2.25 L 14.324219 10.507812 L 22.828125 21.75 L 16.171875 21.75 L 10.953125 14.933594 L 4.992188 21.75 L 1.679688 21.75 L 9.40625 12.914062 L 1.257812 2.25 L 8.082031 2.25 L 12.792969 8.480469 Z M 17.082031 19.773438 L 18.914062 19.773438 L 7.082031 4.125 L 5.113281 4.125 Z M 17.082031 19.773438 " /> </svg></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://www.youtube.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">YouTube</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z" /> </svg></a> </div><starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg><select value="auto" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z" /> </svg></label> </starlight-theme-select> <script> StarlightThemeProvider.updatePickers(); </script> <script type="module">const r="starlight-theme",o=e=>e==="auto"||e==="dark"||e==="light"?e:"auto",c=()=>o(typeof localStorage<"u"&&localStorage.getItem(r));function n(e){typeof localStorage<"u"&&localStorage.setItem(r,e==="light"||e==="dark"?e:"")}const l=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";function t(e){StarlightThemeProvider.updatePickers(e),document.documentElement.dataset.theme=e==="auto"?l():e,n(e)}matchMedia("(prefers-color-scheme: light)").addEventListener("change",()=>{c()==="auto"&&t("auto")});class s extends HTMLElement{constructor(){super(),t(c()),this.querySelector("select")?.addEventListener("change",a=>{a.currentTarget instanceof HTMLSelectElement&&t(o(a.currentTarget.value))})}}customElements.define("starlight-theme-select",s);</script> <script type="module">class n extends HTMLElement{constructor(){super();const e=this.querySelector("select");e&&e.addEventListener("change",t=>{t.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=t.currentTarget.value)})}}customElements.define("starlight-lang-select",n);</script> </div> </div> </header> <nav class="sidebar astro-vrdttmbt" aria-label="Main"><starlight-menu-button class="astro-jif73yzw"> <button aria-expanded="false" aria-label="Menu" aria-controls="starlight__sidebar" class="sl-flex md:sl-hidden astro-jif73yzw"> <svg aria-hidden="true" class="astro-jif73yzw astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z" /> </svg></button> </starlight-menu-button> <script type="module">class s extends HTMLElement{constructor(){super(),this.btn=this.querySelector("button"),this.btn.addEventListener("click",()=>this.toggleExpanded());const t=this.closest("nav");t&&t.addEventListener("keyup",e=>this.closeOnEscape(e))}setExpanded(t){this.setAttribute("aria-expanded",String(t)),document.body.toggleAttribute("data-mobile-menu-expanded",t)}toggleExpanded(){this.setExpanded(this.getAttribute("aria-expanded")!=="true")}closeOnEscape(t){t.code==="Escape"&&(this.setExpanded(!1),this.btn.focus())}}customElements.define("starlight-menu-button",s);</script> <div id="starlight__sidebar" class="sidebar-pane astro-vrdttmbt"> <div class="sidebar-content sl-flex astro-vrdttmbt"><a href="https://developers-cloudflare-com.translate.goog/workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="items-center flex hover:opacity-80 decoration-[color:var(--orange-accent-200)]"> <svg width="0.98em" height="1em" class="text-[color:var(--orange-accent-200)] text-4xl mr-2" data-icon="workers"><symbol id="ai:local:workers" viewbox="0 0 48 49"> <path fill="currentColor" d="m18.63 37.418-9.645-12.9 9.592-12.533-1.852-2.527L5.917 23.595l-.015 1.808 10.86 14.542z" /> <path fill="currentColor" d="M21.997 6.503h-3.712l13.387 18.3-13.072 17.7h3.735L35.4 24.81z" /> <path fill="currentColor" d="M29.175 6.503h-3.758l13.598 18.082-13.598 17.918h3.765l12.908-17.01v-1.808z" /> </symbol><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#ai:local:workers"></use> </svg><span class="text-black dark:text-white"> <strong> Workers </strong> </span> </a> <!-- @ts-expect-error sidebar props don't match as we add additional things --> <sl-sidebar-state-persist data-hash="1u81hgt" class="astro-kku4brbg"> <script> (() => { try { if (!matchMedia('(min-width: 50em)').matches) return; /** @type {HTMLElement | null} */ const target = document.querySelector('sl-sidebar-state-persist'); const state = JSON.parse(sessionStorage.getItem('sl-sidebar-state') || '0'); if (!target || !state || target.dataset.hash !== state.hash) return; window._starlightScrollRestore = state.scroll; customElements.define( 'sl-sidebar-restore', class SidebarRestore extends HTMLElement { connectedCallback() { try { const idx = parseInt(this.dataset.index || ''); const details = this.closest('details'); if (details && typeof state.open[idx] === 'boolean') details.open = state.open[idx]; } catch {} } } ); } catch {} })(); </script> <ul class="top-level astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="0"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Get started</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/get-started/guide/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CLI</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/get-started/dashboard/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dashboard</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/get-started/quickstarts/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Quickstarts</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/examples/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Examples</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/tutorials/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Tutorials</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/demos/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Demos and architectures</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/playground/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Playground</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="1"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Configuration</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Bindings ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/compatibility-dates/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Compatibility dates</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/compatibility-flags/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Compatibility flags</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/cron-triggers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Cron Triggers</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/environment-variables/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Environment variables</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="13"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Integrations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/integrations/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/integrations/apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">APIs</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/integrations/external-services/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">External Services</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/integrations/momento/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Momento</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/multipart-upload-metadata/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Multipart upload metadata</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/workers-with-page-rules/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Page Rules</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/previews/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Preview URLs</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="14"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Routes and domains</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/routing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/routing/custom-domains/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Custom Domains</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/routing/routes/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Routes</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/routing/workers-dev/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">workers.dev</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/secrets/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Secrets</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/smart-placement/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Smart Placement</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="15"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Versions &amp; Deployments</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/versions-and-deployments/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/versions-and-deployments/gradual-deployments/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Gradual deployments</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/versions-and-deployments/rollbacks/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Rollbacks</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="16"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Workers Sites</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/sites/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/sites/start-from-existing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Start from existing</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/sites/start-from-scratch/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Start from scratch</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/sites/start-from-worker/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Start from Worker</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/sites/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers Sites configuration</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="2"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">CI/CD</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="17"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Builds</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuration</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/git-integration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Git Integration</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/build-image/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build Image</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/build-caching/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build caching</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/build-watch-paths/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build watch paths</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/advanced-setups/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Advanced Setups</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/limits-and-pricing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Limits &amp; Pricing</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/builds/troubleshoot/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Troubleshooting</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="18"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">External CI/CD</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/external-cicd/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/external-cicd/github-actions/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">GitHub Actions</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ci-cd/external-cicd/gitlab-pipelines/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">GitLab Pipelines</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"><sl-sidebar-restore data-index="3"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Runtime APIs</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="19"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Bindings (env)</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers-ai/get-started/workers-wrangler/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#2-connect-your-worker-to-workers-ai" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AI ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/analytics/analytics-engine?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Analytics Engine ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/binding/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Assets ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/browser-rendering?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Browser Rendering ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/d1/build-with-d1/d1-client-api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">D1 ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/cloudflare-for-platforms/workers-for-platforms/get-started/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dispatcher (Workers for Platforms) ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/durable-objects/api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Durable Objects ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/environment-variables/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Environment Variables ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/hyperdrive?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Hyperdrive ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/kv/api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">KV ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/mtls/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">mTLS</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/javascript-apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Queues ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/r2/api/workers/workers-api-reference/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">R2 ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/rate-limit/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Rate Limiting</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/configuration/secrets/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Secrets ↗</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="37"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Service bindings</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/service-bindings/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/service-bindings/http/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">HTTP</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/service-bindings/rpc/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">RPC (WorkerEntrypoint)</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/tail-workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Tail Workers ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/vectorize/reference/client-api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Vectorize ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/bindings/version-metadata/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Version metadata</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workflows/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workflows ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/cache/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Cache</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/console/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Console</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/context/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Context (ctx)</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/encoding/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Encoding</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/eventsource/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventSource</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/fetch/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Fetch</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="20"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Handlers</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/handlers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/durable-objects/api/alarms/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Alarm Handler ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/email-routing/email-workers/runtime-api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Email Handler ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/handlers/fetch/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Fetch Handler</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/queues/configuration/javascript-apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#consumer" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Queue Handler ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/handlers/scheduled/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Scheduled Handler</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/handlers/tail/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Tail Handler</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/headers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Headers</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/html-rewriter/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">HTMLRewriter</span> </a></li> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"><sl-sidebar-restore data-index="21"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Node.js compatibility</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/assert/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">assert</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" aria-current="page" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AsyncLocalStorage</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/buffer/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Buffer</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/crypto/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Crypto</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/diagnostics-channel/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Diagnostics Channel</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/eventemitter/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventEmitter</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/path/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">path</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/process/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">process</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/streams/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Streams</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/string-decoder/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">StringDecoder</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/test/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">test</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/url/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">url</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/util/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">util</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/zlib/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">zlib</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/performance/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Performance and timers</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="22"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Remote-procedure call (RPC)</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/lifecycle/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Lifecycle</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/reserved-methods/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Reserved Methods</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/visibility/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Visibility and Security Model</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/typescript/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TypeScript</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/rpc/error-handling/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Error handling</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/request/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Request</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/response/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Response</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="23"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Streams</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/readablestream/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ReadableStream</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/readablestreambyobreader/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ReadableStream BYOBReader</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/readablestreamdefaultreader/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ReadableStream DefaultReader</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/transformstream/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TransformStream</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/writablestream/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">WritableStream</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/streams/writablestreamdefaultwriter/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">WritableStream DefaultWriter</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/tcp-sockets/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TCP sockets</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/web-crypto/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Web Crypto</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/web-standards/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Web standards</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="24"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">WebAssembly (Wasm)</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/webassembly/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/webassembly/javascript/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Wasm in JavaScript</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/websockets/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">WebSockets</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="4"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Static Assets</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/get-started/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Get Started</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/binding/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuration and binding</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/routing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Routing</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/compatibility-matrix/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers vs. Pages (compatibility matrix)</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/static-assets/direct-upload/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Direct Uploads</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="5"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Frameworks</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="25"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Framework guides</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/angular/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Angular</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/astro/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Astro</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/docusaurus/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Docusaurus</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/gatsby/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Gatsby</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/nextjs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Next.js</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/nuxt/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Nuxt</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/qwik/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Qwik</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/remix/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Remix</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/solid/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Solid</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/frameworks/framework-guides/svelte/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Svelte</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="6"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Databases</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/connecting-to-databases/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Connect to databases</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/analytics/analytics-engine/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Analytics Engine ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/vectorize/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Vectorize (vector database) ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/d1/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Cloudflare D1 ↗</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/hyperdrive/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Hyperdrive ↗</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="26"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Database Integrations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/fauna/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Fauna</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/neon/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Neon</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/planetscale/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PlanetScale</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/supabase/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Supabase</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/turso/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Turso</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/upstash/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Upstash</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/databases/native-integrations/xata/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Xata</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="7"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Testing</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/local-development/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Local development</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/unit-testing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Unit testing</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/integration-testing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Integration testing</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="27"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Vitest integration</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="38"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Get started</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/get-started/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/get-started/write-your-first-test/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Write your first test</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/get-started/migrate-from-miniflare-2/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migrate from Miniflare 2's test environments</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/get-started/migrate-from-unstable-dev/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migrate from unstable_dev</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/recipes/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Recipes</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuration</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/test-apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Test APIs</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/isolation-and-concurrency/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Isolation and concurrency</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/testing/vitest-integration/known-issues/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Known issues</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="8"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Observability</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="28"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Logs</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/workers-logs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers Logs</span> <span class="sl-badge tip small astro-3ii7xxms astro-avdet4wd">New</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/real-time-logs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Real-time logs</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/tail-workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Tail Workers</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/logs/logpush/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers Logpush</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="29"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">DevTools</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/dev-tools/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/dev-tools/breakpoints/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Breakpoints</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/dev-tools/cpu-usage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Profiling CPU usage</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/dev-tools/memory-usage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Profiling Memory</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/errors/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Errors and exceptions</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="30"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Integrations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/integrations/baselime-integration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Baselime integration</span> <span class="sl-badge caution small astro-3ii7xxms astro-avdet4wd">Maintenance Mode</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/integrations/sentry/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Sentry</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/metrics-and-analytics/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Metrics and analytics</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/observability/source-maps/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Source maps and stack traces</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="9"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Wrangler</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/install-and-update/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Install/Update Wrangler</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/api/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">API</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/bundling/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Bundling</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/commands/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Commands</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuration</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/custom-builds/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Custom builds</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/deprecations/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Deprecations</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/environments/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Environments</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="31"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Migrations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="39"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Migrate from Wrangler v1 to v2</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/eject-webpack/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">1. Migrate webpack projects</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/update-v1-to-v2/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">2. Update to Wrangler v2</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="41"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Wrangler v1 (legacy)</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/install-update/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Install / Update</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/authentication/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Authentication</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/commands/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Commands</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuration</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/v1-to-v2/wrangler-legacy/webpack/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Webpack</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/migration/update-v2-to-v3/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migrate from Wrangler v2 to v3</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/wrangler/system-environment-variables/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">System environment variables</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="10"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Languages</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="32"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">JavaScript</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/javascript/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/examples/?languages=JavaScript&amp;_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Examples ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="33"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">TypeScript</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/typescript/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/examples/?languages=TypeScript&amp;_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Examples ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="34"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Python</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/how-python-workers-work/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">How Python Workers Work</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/stdlib/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Standard Library</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/examples/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Examples</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/ffi/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Foreign Function Interface (FFI)</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="40"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Packages</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/packages/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/packages/fastapi/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">FastAPI</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/python/packages/langchain/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Langchain</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="35"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Rust</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/rust/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> <span class="sl-badge default small astro-3ii7xxms astro-avdet4wd">Beta</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/languages/rust/crates/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Supported crates</span> </a></li> </ul> </details></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="11"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Platform</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/pricing/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Pricing</span> </a></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="36"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Changelog</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/changelog/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Overview</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/changelog/historical-changelog/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers (Historic)</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/changelog/wrangler/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Wrangler</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/limits/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Limits</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/storage-options/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Choose a data or storage product</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/betas/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Betas</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/platform/known-issues/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Known issues</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/cloudflare-for-platforms/workers-for-platforms/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Workers for Platforms ↗</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"><sl-sidebar-restore data-index="12"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"><span class="large astro-3ii7xxms">Reference</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg></summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/reference/how-the-cache-works/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">How the Cache works</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/reference/how-workers-works/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">How Workers works</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/reference/migrate-to-module-workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migrate from Service Workers to ES Modules</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/reference/protocols/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Protocols</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/reference/security-model/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Security model</span> </a></li> </ul> </details></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/glossary/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">Glossary</span> </a></li> <li class="astro-3ii7xxms"><a href="https://developers-cloudflare-com.translate.goog/workers/ai/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="large astro-3ii7xxms"> <span class="astro-3ii7xxms">AI Assistant ↗</span> </a></li> </ul> <script> (() => { const scroller = document.getElementById('starlight__sidebar'); if (!window._starlightScrollRestore || !scroller) return; scroller.scrollTop = window._starlightScrollRestore; delete window._starlightScrollRestore; })(); </script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-wu23bvmt"> <div class="sl-flex social-icons astro-wu23bvmt"> <div class="items-center hidden lg:flex mx-auto astro-r3tjzkat"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Products</span> </a><a href="https://developers-cloudflare-com.translate.goog/learning-paths/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Learning</span> </a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://www.cloudflarestatus.com/" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Status</span> </a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Support</span> </a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://dash.cloudflare.com" class="px-4 no-underline text-[--sl-color-text] font-medium astro-r3tjzkat"> <span class="astro-r3tjzkat">Log in</span> </a> </div><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://github.com/cloudflare/cloudflare-docs" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z" /> </svg></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://x.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">X</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M 18.242188 2.25 L 21.554688 2.25 L 14.324219 10.507812 L 22.828125 21.75 L 16.171875 21.75 L 10.953125 14.933594 L 4.992188 21.75 L 1.679688 21.75 L 9.40625 12.914062 L 1.257812 2.25 L 8.082031 2.25 L 12.792969 8.480469 Z M 17.082031 19.773438 L 18.914062 19.773438 L 7.082031 4.125 L 5.113281 4.125 Z M 17.082031 19.773438 " /> </svg></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://www.youtube.com/cloudflare" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">YouTube</span> <svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z" /> </svg></a> </div><starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z" /> </svg><select value="auto" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"> <path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z" /> </svg></label> </starlight-theme-select> <script> StarlightThemeProvider.updatePickers(); </script> </div> </div> </div> </div> </nav> <div class="main-frame astro-vrdttmbt"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-67yu43on"> <aside class="right-sidebar-container astro-67yu43on"> <div class="right-sidebar astro-67yu43on"> <div class="lg:sl-hidden astro-pb3aqygn"> <mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-doynk5tl"> <nav aria-labelledby="starlight__on-this-page--mobile" class="astro-doynk5tl"> <details id="starlight__mobile-toc" class="astro-doynk5tl"> <summary id="starlight__on-this-page--mobile" class="sl-flex astro-doynk5tl"> <div class="toggle sl-flex astro-doynk5tl"> On this page <svg aria-hidden="true" class="caret astro-doynk5tl astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"> <path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z" /> </svg> </div><span class="display-current astro-doynk5tl"></span></summary> <div class="dropdown astro-doynk5tl"> <ul class="isMobile astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#background" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Background</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Constructor</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Methods</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#static-methods" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Static Methods</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#examples" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Examples</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#fetch-listener" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Fetch Listener</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#multiple-stores" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Multiple stores</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#unhandled-rejections" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Unhandled Rejections</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asynclocalstoragebind-and-asynclocalstoragesnapshot" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">AsyncLocalStorage.bind() and AsyncLocalStorage.snapshot()</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asyncresource" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">AsyncResource</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor-1" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Constructor</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods-1" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Methods</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#caveats" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Caveats</span> </a></li> </ul> </div> </details> </nav> </mobile-starlight-toc> <script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.C181hMzK.js"></script> </div> <div class="right-sidebar-panel sl-hidden lg:sl-block astro-pb3aqygn"> <div class="sl-container astro-pb3aqygn"> <starlight-toc data-min-h="2" data-max-h="3"> <nav aria-labelledby="starlight__on-this-page"> <h2 id="starlight__on-this-page">On this page</h2> <ul class="astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#background" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Background</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Constructor</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Methods</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#static-methods" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Static Methods</span> </a></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#examples" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Examples</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#fetch-listener" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Fetch Listener</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#multiple-stores" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Multiple stores</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#unhandled-rejections" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Unhandled Rejections</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asynclocalstoragebind-and-asynclocalstoragesnapshot" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">AsyncLocalStorage.bind() and AsyncLocalStorage.snapshot()</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asyncresource" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">AsyncResource</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor-1" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Constructor</span> </a></li> <li class="astro-g2bywc46" style="--depth: 1;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods-1" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Methods</span> </a></li> </ul></li> <li class="astro-g2bywc46" style="--depth: 0;"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#caveats" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Caveats</span> </a></li> </ul> </nav> </starlight-toc> <script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.CKWWgpjV.js"></script><br><feedback-prompt class="not-content astro-x6kpz2mu"> <div id="feedback-thumbs" class="astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">Was this helpful?</h2> <div class="not-content astro-x6kpz2mu"> <svg width="1em" height="1em" viewbox="0 0 24 24" class="astro-x6kpz2mu" data-icon="material-symbols:thumb-up-outline-rounded"> <title>Yes</title><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#ai:material-symbols:thumb-up-outline-rounded"></use> </svg> <svg width="1em" height="1em" viewbox="0 0 24 24" class="astro-x6kpz2mu" data-icon="material-symbols:thumb-down-outline-rounded"> <title>No</title><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#ai:material-symbols:thumb-down-outline-rounded"></use> </svg> </div> </div> <div id="feedback-yes" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">What did you like?</h2> <form class="astro-x6kpz2mu"> <fieldset class="astro-x6kpz2mu"> <div class="astro-x6kpz2mu"><input type="radio" id="accurate" value="accurate" name="reason" class="astro-x6kpz2mu"> <label for="accurate" class="astro-x6kpz2mu">Accurate</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="easy-to-understand" value="easy-to-understand" name="reason" class="astro-x6kpz2mu"> <label for="easy-to-understand" class="astro-x6kpz2mu">Easy to understand</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="solved-my-problem" value="solved-my-problem" name="reason" class="astro-x6kpz2mu"> <label for="solved-my-problem" class="astro-x6kpz2mu">Solved my problem</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="helped-me-decide-to-use-the-product" value="solved-my-problem" name="reason" class="astro-x6kpz2mu"> <label for="helped-me-decide-to-use-the-product" class="astro-x6kpz2mu">Helped me decide to use the product</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="other" value="other" name="reason" class="astro-x6kpz2mu"> <label for="other" class="astro-x6kpz2mu">Other</label> <input type="text" placeholder="Tell us more about your experience." id="info" name="info" class="astro-x6kpz2mu"> </div><input type="submit" value="Submit" class="astro-x6kpz2mu"> </fieldset> </form> </div> <div id="feedback-no" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">What went wrong?</h2> <form class="astro-x6kpz2mu"> <fieldset class="astro-x6kpz2mu"> <div class="astro-x6kpz2mu"><input type="radio" id="hard-to-understand" value="hard-to-understand" name="reason" class="astro-x6kpz2mu"> <label for="hard-to-understand" class="astro-x6kpz2mu">Hard to understand</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="incorrect-information" value="incorrect-information" name="reason" class="astro-x6kpz2mu"> <label for="incorrect-information" class="astro-x6kpz2mu">Incorrect information</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="missing-the-information" value="missing-the-information" name="reason" class="astro-x6kpz2mu"> <label for="missing-the-information" class="astro-x6kpz2mu">Missing the information</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="other" value="other" name="reason" class="astro-x6kpz2mu"> <label for="other" class="astro-x6kpz2mu">Other</label> <input type="text" placeholder="Tell us more about your experience." id="info" name="info" class="astro-x6kpz2mu"> </div><input type="submit" value="Submit" class="astro-x6kpz2mu"> </fieldset> </form> </div> <div id="feedback-thanks" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">Thank you for helping improve Cloudflare's documentation!</h2> </div> </feedback-prompt> </div> </div> </div> </aside> <div class="main-pane astro-67yu43on"> <main data-pagefind-body lang="en" dir="ltr" class="astro-bguv2lll"> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"><astro-breadcrumbs data-main-bem-class="c-breadcrumbs" data-id="breadcrumbs" data-path-length="4" data-truncated> <nav aria-label="breadcrumbs" class="c-breadcrumbs" id="breadcrumbs"> <ol class="c-breadcrumbs__crumbs has-separators"> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/products/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="c-breadcrumbs__link is-index"> Products </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb has-ellipsis"><button type="button" aria-label="Show hidden navigation" class="c-breadcrumbs__truncated-button"> … </button> <span class="c-breadcrumbs__separator" aria-hidden="true"> </span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/workers/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="c-breadcrumbs__link"> Workers </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="c-breadcrumbs__link"> Runtime APIs </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="c-breadcrumbs__link"> Node.js compatibility </a> <span class="c-breadcrumbs__separator" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="astro-couag5ji"> <polyline points="9 18 15 12 9 6" class="astro-couag5ji"></polyline> </svg></span></li> <li class="c-breadcrumbs__crumb"><a href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="c-breadcrumbs__link is-current" aria-current="location"> AsyncLocalStorage </a></li> </ol> </nav> </astro-breadcrumbs> <script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/products/","name":"Products"}},{"@type":"ListItem","position":2,"item":{"@id":"/workers/","name":"Workers"}},{"@type":"ListItem","position":3,"item":{"@id":"/workers/runtime-apis/","name":"Runtime APIs"}},{"@type":"ListItem","position":4,"item":{"@id":"/workers/runtime-apis/nodejs/","name":"Node.js compatibility"}},{"@type":"ListItem","position":5,"item":{"@id":"/workers/runtime-apis/nodejs/asynclocalstorage/","name":"AsyncLocalStorage"}}]}</script> <script type="module">class t extends HTMLElement{constructor(){super(),this.isManualToggle=!1,this.breadcrumbs=null,this.mainBemClass=null,this.totalWidth=0,this.resizeObserver=null,this.handleTruncatedButtonClick=()=>{this.breadcrumbs?.classList.remove("is-truncated"),this.isManualToggle=!0},this.mainBemClass=this.dataset.mainBemClass||null;const e=this.dataset.id;!("truncated"in this.dataset)||!e||(this.breadcrumbs=document.getElementById(e),this.initializeCrumbs(),this.setupResizeObserver())}initializeCrumbs(){this.breadcrumbs?.querySelectorAll(`.${this.mainBemClass}__crumb`)?.forEach(s=>{this.totalWidth+=s.offsetWidth})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(e=>{e.forEach(s=>{this.checkOverflow(s.target.clientWidth)})}),this.breadcrumbs&&this.resizeObserver.observe(this.breadcrumbs)}connectedCallback(){this.showHiddenCrumbs()}disconnectedCallback(){this.resizeObserver&&this.breadcrumbs&&(this.resizeObserver.unobserve(this.breadcrumbs),this.resizeObserver.disconnect())}toggleTruncated(e){this.breadcrumbs?.classList.toggle("is-truncated",e)}showHiddenCrumbs(){const e=this.breadcrumbs?.querySelector(`.${this.mainBemClass}__truncated-button`);e?.removeEventListener("click",this.handleTruncatedButtonClick),e?.addEventListener("click",this.handleTruncatedButtonClick.bind(this))}checkOverflow(e){const s=this.totalWidth>e&&!this.isManualToggle;this.toggleTruncated(s),s||(this.isManualToggle=!1)}}customElements.get("astro-breadcrumbs")||customElements.define("astro-breadcrumbs",t);</script> <h1 id="_top" class="astro-j6tvhyss">AsyncLocalStorage</h1> </div> </div> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"><starlight-image-zoom class="astro-vjux6bgf"> <template class="astro-vjux6bgf"><dialog class="starlight-image-zoom-dialog astro-vjux6bgf"> <button aria-label="Unzoom image" class="starlight-image-zoom-control astro-vjux6bgf"> <svg aria-hidden="true" fill="currentColor" viewbox="0 0 24 24" class="astro-vjux6bgf"><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#starlight-image-zoom-icon-unzoom" class="astro-vjux6bgf"></use> </svg></button> <figure class="astro-vjux6bgf"></figure> </dialog> </template> <svg xmlns="http://www.w3.org/2000/svg" style="display:none" class="astro-vjux6bgf"><symbol id="starlight-image-zoom-icon-zoom" viewbox="0 0 24 24" class="astro-vjux6bgf"> <path d="M9.79 12.79 4 18.59V17a1 1 0 0 0-2 0v4a1 1 0 0 0 .08.38 1 1 0 0 0 .54.54A1 1 0 0 0 3 22h4a1 1 0 0 0 0-2H5.41l5.8-5.79a1 1 0 0 0-1.42-1.42ZM21.92 2.62a1 1 0 0 0-.54-.54A1 1 0 0 0 21 2h-4a1 1 0 0 0 0 2h1.59l-5.8 5.79a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L20 5.41V7a1 1 0 0 0 2 0V3a1 1 0 0 0-.08-.38Z" class="astro-vjux6bgf" /> </symbol> <symbol id="starlight-image-zoom-icon-unzoom" viewbox="0 0 24 24" class="astro-vjux6bgf"> <path d="M21.71 2.29a1 1 0 0 0-1.42 0l-5.79 5.8V6.5a1 1 0 0 0-2 0v4a1 1 0 0 0 .08.38 1 1 0 0 0 .54.54 1 1 0 0 0 .38.08h4a1 1 0 0 0 0-2h-1.59l5.8-5.79a1 1 0 0 0 0-1.42ZM10.88 12.58a1 1 0 0 0-.38-.08h-4a1 1 0 0 0 0 2h1.59l-5.8 5.79a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.79-5.8v1.59a1 1 0 0 0 2 0v-4a1 1 0 0 0-.08-.38 1 1 0 0 0-.54-.54Z" class="astro-vjux6bgf" /> </symbol> </svg> </starlight-image-zoom> <script type="module">const L="starlight-image-zoom-zoomable",w=window.requestIdleCallback??(y=>setTimeout(y,1));customElements.define("starlight-image-zoom",class f extends HTMLElement{#t;#i=[];#o;#s=this.querySelector("template");#e={image:"starlight-image-zoom-image",opened:"starlight-image-zoom-opened",source:"starlight-image-zoom-source",transition:"starlight-image-zoom-transition"};#r="zoomTransform";static#u=!1;constructor(){super();const t=()=>{w(()=>{const e=[...document.querySelectorAll(L)];e.length!==0&&(this.#m(e),document.addEventListener("click",this.#d),window.addEventListener("resize",this.#a))})};window.addEventListener("DOMContentLoaded",t,{once:!0}),document.addEventListener("astro:after-preparation",()=>{document.removeEventListener("click",this.#d),window.removeEventListener("resize",this.#a)},{once:!0}),f.#u||=document.addEventListener("astro:after-swap",t)===void 0}#m(t){for(const e of t){const n=e.querySelector("img");n&&(this.#i.push(n),e.querySelector("button")?.addEventListener("click",i=>{i.stopPropagation(),this.#l(n)}))}}#d=({target:t})=>{if(!(t instanceof HTMLElement&&t.closest("figcaption"))){if(this.#t){this.#n();return}t instanceof HTMLImageElement&&this.#i.includes(t)&&this.#l(t)}};#a=()=>{this.#n(!0)};#c=()=>{this.#n()};#p=t=>{t.preventDefault(),this.#n()};#l(t){if(!this.#s||this.#t)return;this.#o=document.activeElement;const e=document.createElement("div");e.append(this.#s.content.cloneNode(!0));const n=e.querySelector("dialog"),i=n?.querySelector("figure");if(!n||!i)return;const r={overflow:document.body.style.overflow,width:document.body.style.width},d=document.body.clientWidth;document.body.style.overflow="hidden",document.body.style.width=`${d}px`,document.querySelector("header")?.style.setProperty("padding-inline-end",`calc(var(--sl-nav-pad-x) + ${window.innerWidth-d}px)`);const s=this.#f(t);t.classList.add(this.#e.source),s.classList.add(this.#e.image),i.append(s),this.#w(t.getAttribute("alt"),i),document.body.append(e),document.addEventListener("wheel",this.#c,{once:!0}),n.addEventListener("cancel",this.#p),n.showModal(),w(()=>{s.style.transform="",document.body.classList.add(this.#e.opened)}),this.#t={body:r,dialog:n,image:t,zoomedImage:s}}#n(t=!1){if(window.removeEventListener("wheel",this.#c),!this.#t)return;const{zoomedImage:e}=this.#t;e.style.transform=e.dataset[this.#r]??"",document.body.classList.add(this.#e.transition),document.body.classList.remove(this.#e.opened);const{matches:n}=window.matchMedia("(prefers-reduced-motion: reduce)");t||n?this.#h():e.addEventListener("transitionend",this.#h,{once:!0})}#h=()=>{if(!this.#t)return;const{dialog:t,image:e}=this.#t;document.body.classList.remove(this.#e.transition),e.classList.remove(this.#e.source),t.parentElement?.remove(),document.body.style.overflow=this.#t.body.overflow,document.body.style.width=this.#t.body.width,document.querySelector("header")?.style.setProperty("padding-inline-end","var(--sl-nav-pad-x)"),this.#t=void 0,this.#o instanceof HTMLElement&&this.#o.focus()};#w(t,e){if(Object.hasOwn(this.dataset,"hideCaption")||(t=t?.trim()??"",t.length===0))return;const n=document.createElement("figcaption");n.ariaHidden="true",n.textContent=t,e.append(n)}#f(t){const e=t.getBoundingClientRect(),n=this.#y(t),i=n?window.innerWidth:t.naturalWidth,r=n?window.innerHeight:t.naturalHeight,d=Math.min(window.innerWidth,i),s=Math.min(window.innerHeight,r),l=Math.min(d/i,s/r),a=(n?window.innerWidth:t.naturalWidth)*l,c=(n?window.innerHeight:t.naturalHeight)*l,h=(window.innerHeight-c)/2,u=(window.innerWidth-a)/2,o=t.cloneNode(!0);o.removeAttribute("id"),o.style.position="absolute",o.style.width=`${a}px`,o.style.height=`${c}px`,o.style.top=`${h}px`,o.style.left=`${u}px`,o.style.transform="";const m=e.width/a,p=e.height/c,g=(-u+(e.width-a)/2+e.left)/m,v=(-h+(e.height-c)/2+e.top)/p;return o.style.transform=`scale(${m}, ${p}) translate3d(${g}px, ${v}px, 0)`,o.dataset[this.#r]=o.style.transform,t.parentElement?.tagName==="PICTURE"&&t.currentSrc&&(o.src=t.currentSrc),o}#y(t){return t.currentSrc.toLowerCase().endsWith(".svg")}});</script> <div class="sl-markdown-content astro-cedpceuv"> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="background">Background</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#background"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <aside aria-label="Warning" class="starlight-aside starlight-aside--caution"> <p class="starlight-aside__title" aria-hidden="true"> <svg viewbox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"> <path d="M12 16C11.8022 16 11.6089 16.0587 11.4444 16.1686C11.28 16.2784 11.1518 16.4346 11.0761 16.6173C11.0004 16.8001 10.9806 17.0011 11.0192 17.1951C11.0578 17.3891 11.153 17.5673 11.2929 17.7071C11.4327 17.847 11.6109 17.9422 11.8049 17.9808C11.9989 18.0194 12.2 17.9996 12.3827 17.9239C12.5654 17.8482 12.7216 17.72 12.8315 17.5556C12.9413 17.3911 13 17.1978 13 17C13 16.7348 12.8946 16.4805 12.7071 16.2929C12.5196 16.1054 12.2652 16 12 16ZM22.67 17.47L14.62 3.47003C14.3598 3.00354 13.9798 2.61498 13.5192 2.3445C13.0586 2.07401 12.5341 1.9314 12 1.9314C11.4659 1.9314 10.9414 2.07401 10.4808 2.3445C10.0202 2.61498 9.64019 3.00354 9.38 3.47003L1.38 17.47C1.11079 17.924 0.966141 18.441 0.960643 18.9688C0.955144 19.4966 1.089 20.0166 1.34868 20.4761C1.60837 20.9356 1.9847 21.3185 2.43968 21.5861C2.89466 21.8536 3.41218 21.9964 3.94 22H20.06C20.5921 22.0053 21.1159 21.8689 21.5779 21.6049C22.0399 21.341 22.4234 20.9589 22.689 20.4978C22.9546 20.0368 23.0928 19.5134 23.0895 18.9814C23.0862 18.4493 22.9414 17.9277 22.67 17.47ZM20.94 19.47C20.8523 19.626 20.7245 19.7556 20.5697 19.8453C20.4149 19.935 20.2389 19.9815 20.06 19.98H3.94C3.76111 19.9815 3.5851 19.935 3.43032 19.8453C3.27553 19.7556 3.14765 19.626 3.06 19.47C2.97223 19.318 2.92602 19.1456 2.92602 18.97C2.92602 18.7945 2.97223 18.622 3.06 18.47L11.06 4.47003C11.1439 4.30623 11.2714 4.16876 11.4284 4.07277C11.5855 3.97678 11.766 3.92599 11.95 3.92599C12.134 3.92599 12.3145 3.97678 12.4716 4.07277C12.6286 4.16876 12.7561 4.30623 12.84 4.47003L20.89 18.47C20.9892 18.6199 21.0462 18.7937 21.055 18.9732C21.0638 19.1527 21.0241 19.3312 20.94 19.49V19.47ZM12 8.00003C11.7348 8.00003 11.4804 8.10538 11.2929 8.29292C11.1054 8.48046 11 8.73481 11 9.00003V13C11 13.2652 11.1054 13.5196 11.2929 13.7071C11.4804 13.8947 11.7348 14 12 14C12.2652 14 12.5196 13.8947 12.7071 13.7071C12.8946 13.5196 13 13.2652 13 13V9.00003C13 8.73481 12.8946 8.48046 12.7071 8.29292C12.5196 8.10538 12.2652 8.00003 12 8.00003Z" /> </svg>Warning</p> <div class="starlight-aside__content"> <p>To use Node.js APIs in your Worker, add the <a href="https://developers-cloudflare-com.translate.goog/workers/configuration/compatibility-flags/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#nodejs-compatibility-flag"><code dir="auto">nodejs_compat_v2</code> compatibility flag</a> to your <code dir="auto">wrangler.toml</code> file.</p> </div> </aside> <p>Cloudflare Workers provides an implementation of a subset of the Node.js <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/dist/latest-v18.x/docs/api/async_context.html%23class-asynclocalstorage" target="_blank" rel="noopener"><code dir="auto">AsyncLocalStorage</code><span> ↗</span></a> API for creating in-memory stores that remain coherent through asynchronous operations.</p> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="constructor">Constructor</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <div class="expressive-code"> <link rel="stylesheet" href="/_astro/ec.jmw5e.css"> <script type="module" src="/_astro/ec.8zarh.js"></script> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const asyncLocalStorage = new AsyncLocalStorage();"> <div></div></button> </div> </figure> </div> <ul> <li><p><code>new AsyncLocalStorage()</code> : AsyncLocalStorage</p> <ul> <li>Returns a new <code dir="auto">AsyncLocalStorage</code> instance.</li> </ul></li> </ul> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="methods">Methods</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <ul> <li><p><code dir="auto">getStore()</code> : any</p> <ul> <li>Returns the current store. If called outside of an asynchronous context initialized by calling <code dir="auto">asyncLocalStorage.run()</code>, it returns <code dir="auto">undefined</code>.</li> </ul></li> <li><p><code>run(storeany, callbackfunction, ...argsarguments)</code> : any</p> <ul> <li>Runs a function synchronously within a context and returns its return value. The store is not accessible outside of the callback function. The store is accessible to any asynchronous operations created within the callback. The optional <code dir="auto">args</code> are passed to the callback function. If the callback function throws an error, the error is thrown by <code dir="auto">run()</code> also.</li> </ul></li> <li><p><code>exit(callbackfunction, ...argsarguments)</code> : any</p> <ul> <li>Runs a function synchronously outside of a context and returns its return value. This method is equivalent to calling <code dir="auto">run()</code> with the <code dir="auto">store</code> value set to <code dir="auto">undefined</code>.</li> </ul></li> </ul> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="static-methods">Static Methods</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#static-methods"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <ul> <li><p><code dir="auto">AsyncLocalStorage.bind(fn)</code> : function</p> <ul> <li>Captures the asynchronous context that is current when <code dir="auto">bind()</code> is called and returns a function that enters that context before calling the passed in function.</li> </ul></li> <li><p><code dir="auto">AsyncLocalStorage.snapshot()</code> : function</p> <ul> <li>Captures the asynchronous context that is current when <code dir="auto">snapshot()</code> is called and returns a function that enters that context before calling a given function.</li> </ul></li> </ul> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="examples">Examples</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#examples"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="fetch-listener">Fetch Listener</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#fetch-listener"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">let</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#D5D7D8;--1:#8F1500">idSeq</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#B59EE1;--1:#7C008F">0</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">fetch</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">req</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--1:#8F1500"><span style="--0:#D5D7D8">idSeq</span><span style="--0:#EE9080">++</span></span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Simulate some async activity...</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">await</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">scheduler</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">wait</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#B59EE1;--1:#7C008F">1000</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Response</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">())</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const asyncLocalStorage = new AsyncLocalStorage();let idSeq = 0;export default { async fetch(req) { return asyncLocalStorage.run(idSeq++, () => { // Simulate some async activity... await scheduler.wait(1000); return new Response(asyncLocalStorage.getStore()); }); }};"> <div></div></button> </div> </figure> </div> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="multiple-stores">Multiple stores</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#multiple-stores"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>The API supports multiple <code dir="auto">AsyncLocalStorage</code> instances to be used concurrently.</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als1</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als2</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">fetch</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">req</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">als1</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#B59EE1;--1:#7C008F">123</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">als2</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#B59EE1;--1:#7C008F">321</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Simulate some async activity...</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">await</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">scheduler</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">wait</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#B59EE1;--1:#7C008F">1000</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Response</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#FDDA68;--1:#A84E00">`</span><span style="--0:#89DDFF;--1:#007474">${</span><span style="--0:#EEFFFF;--1:#00268F">als1</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#FDDA68;--1:#A84E00">()</span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#FDDA68;--1:#A84E00">-</span><span style="--0:#89DDFF;--1:#007474">${</span><span style="--0:#EEFFFF;--1:#00268F">als2</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#FDDA68;--1:#A84E00">()</span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#FDDA68;--1:#A84E00">`</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const als1 = new AsyncLocalStorage();const als2 = new AsyncLocalStorage();export default { async fetch(req) { return als1.run(123, () => { return als2.run(321, () => { // Simulate some async activity... await scheduler.wait(1000); return new Response(`${als1.getStore()}-${als2.getStore()}`); }); }); }};"> <div></div></button> </div> </figure> </div> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="unhandled-rejections">Unhandled Rejections</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#unhandled-rejections"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>When a <code dir="auto">Promise</code> rejects and the rejection is unhandled, the async context propagates to the <code dir="auto">'unhandledrejection'</code> event handler:</p> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">let</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#D5D7D8;--1:#8F1500">idSeq</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#B59EE1;--1:#7C008F">0</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#57C78F;--1:#00783C">addEventListener</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#FDDA68;--1:#A84E00">'unhandledrejection'</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">event</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF"> </span></span><span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">()</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">'unhandled rejection!'</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">export</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">default</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">async</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">fetch</span><span style="--0:#89DDFF;--1:#007474">(</span><span style="--0:#B59EE1;--1:#7C008F">req</span><span style="--0:#89DDFF;--1:#007474">)</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">asyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--1:#8F1500"><span style="--0:#D5D7D8">idSeq</span><span style="--0:#EE9080">++</span></span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// Cause an unhandled rejection!</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">throw</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">Error</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#FDDA68;--1:#A84E00">'boom'</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const asyncLocalStorage = new AsyncLocalStorage();let idSeq = 0;addEventListener('unhandledrejection', (event) => { console.log(asyncLocalStorage.getStore(), 'unhandled rejection!');});export default { async fetch(req) { return asyncLocalStorage.run(idSeq++, () => { // Cause an unhandled rejection! throw new Error('boom'); }); }};"> <div></div></button> </div> </figure> </div> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="asynclocalstoragebind-and-asynclocalstoragesnapshot"><code dir="auto">AsyncLocalStorage.bind()</code> and <code dir="auto">AsyncLocalStorage.snapshot()</code></h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asynclocalstoragebind-and-asynclocalstoragesnapshot"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">function</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">foo</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">())</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">function</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">bar</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">())</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">oneFoo</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#B59EE1;--1:#7C008F">123</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">AsyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">bind</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#D5D7D8;--1:#8F1500">foo</span><span style="--0:#EE9080;--1:#32008F">))</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#57C78F;--1:#00783C">oneFoo</span><span style="--0:#EEFFFF;--1:#62676A">()</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// prints 123</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">snapshot</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#FDDA68;--1:#A84E00">'abc'</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">AsyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">snapshot</span><span style="--0:#EE9080;--1:#32008F">())</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#57C78F;--1:#00783C">snapshot</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">foo</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// prints 'abc'</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#57C78F;--1:#00783C">snapshot</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#D5D7D8;--1:#8F1500">bar</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// prints 'abc'</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const als = new AsyncLocalStorage();function foo() { console.log(als.getStore()); }function bar() { console.log(als.getStore()); }const oneFoo = als.run(123, () => AsyncLocalStorage.bind(foo));oneFoo(); // prints 123const snapshot = als.run('abc', () => AsyncLocalStorage.snapshot());snapshot(foo); // prints 'abc'snapshot(bar); // prints 'abc'"> <div></div></button> </div> </figure> </div> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">class</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">MyResource</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"><span style="--0:#EEFFFF;--1:#62676A"> </span></span><span style="--0:#EEFFFF;--1:#62676A">#runInAsyncScope </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">AsyncLocalStorage</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">snapshot</span><span style="--0:#EEFFFF;--1:#62676A">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#57C78F;--1:#00783C">doSomething</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#FF8398;--0fs:italic;--1:#B73C51;--1fs:italic">this</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">#runInAsyncScope</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">myResource</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#B59EE1;--1:#7C008F">123</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">MyResource</span><span style="--0:#EE9080;--1:#32008F">())</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">myResource</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">doSomething</span><span style="--0:#EEFFFF;--1:#62676A">())</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// prints 123</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncLocalStorage } from 'node:async_hooks';const als = new AsyncLocalStorage();class MyResource { #runInAsyncScope = AsyncLocalStorage.snapshot(); doSomething() { this.#runInAsyncScope(() => { return als.getStore(); }); }};const myResource = als.run(123, () => new MyResource());console.log(myResource.doSomething()); // prints 123"> <div></div></button> </div> </figure> </div> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="asyncresource"><code dir="auto">AsyncResource</code></h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#asyncresource"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <p>The <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/dist/latest-v18.x/docs/api/async_context.html%23class-asyncresource" target="_blank" rel="noopener"><code dir="auto">AsyncResource</code><span> ↗</span></a> class is a component of Node.js' async context tracking API that allows users to create their own async contexts. Objects that extend from <code dir="auto">AsyncResource</code> are capable of propagating the async context in much the same way as promises.</p> <p>Note that <code dir="auto">AsyncLocalStorage.snapshot()</code> and <code dir="auto">AsyncLocalStorage.bind()</code> provide a better approach. <code dir="auto">AsyncResource</code> is provided solely for backwards compatibility with Node.js.</p> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="constructor-1">Constructor</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#constructor-1"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <div class="expressive-code"> <figure class="frame not-content"> <figcaption class="header"></figcaption> <pre data-language="js"><code> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">import </span><span style="--0:#89DDFF;--1:#007474">{</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncResource</span></span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--1:#8F1500"><span style="--0:#EE9080"> </span><span style="--0:#D5D7D8">AsyncLocalStorage</span><span style="--0:#EE9080"> </span></span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EE9080;--1:#8F1500"> from </span><span style="--0:#FDDA68;--1:#A84E00">'node:async_hooks'</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">AsyncLocalStorage</span><span style="--0:#EE9080;--1:#32008F">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">class</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#57C78F;--1:#00783C">MyResource</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">extends</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#FDDA68;--1:#A84E00">AsyncResource</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">constructor</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// The type string is required by Node.js but unused in Workers.</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#FF8398;--0fs:italic;--1:#B73C51;--1fs:italic">super</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#FDDA68;--1:#A84E00">'MyResource'</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#57C78F;--1:#00783C">doSomething</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#FF8398;--0fs:italic;--1:#B73C51;--1fs:italic">this</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">runInAsyncScope</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#89DDFF;--1:#007474">{</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#EE9080;--1:#8F1500">return</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">getStore</span><span style="--0:#EEFFFF;--1:#62676A">()</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span><span style="--0:#EEFFFF;--1:#62676A">)</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span class="indent"> </span><span style="--0:#89DDFF;--1:#007474">}</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#89DDFF;--1:#007474">};</span> </div> </div> <div class="ec-line"> <div class="code"> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EE9080;--1:#8F1500">const</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">myResource</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EEFFFF;--1:#00268F">als</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">run</span><span style="--0:#EE9080;--1:#32008F">(</span><span style="--0:#B59EE1;--1:#7C008F">123</span><span style="--0:#89DDFF;--1:#007474">,</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#89DDFF;--1:#007474">()</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">=&gt;</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#EE9080;--1:#8F1500">new</span><span style="--0:#EE9080;--1:#32008F"> </span><span style="--0:#57C78F;--1:#00783C">MyResource</span><span style="--0:#EE9080;--1:#32008F">())</span><span style="--0:#89DDFF;--1:#007474">;</span> </div> </div> <div class="ec-line"> <div class="code"> <span style="--0:#EEFFFF;--1:#00268F">console</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">log</span><span style="--0:#EEFFFF;--1:#62676A">(</span><span style="--0:#EEFFFF;--1:#00268F">myResource</span><span style="--0:#89DDFF;--1:#007474">.</span><span style="--0:#57C78F;--1:#00783C">doSomething</span><span style="--0:#EEFFFF;--1:#62676A">())</span><span style="--0:#89DDFF;--1:#007474">;</span><span style="--0:#EEFFFF;--1:#62676A"> </span><span style="--0:#A9A9A5;--0fs:italic;--1:#62676A;--1fs:italic">// prints 123</span> </div> </div></code></pre> <div class="copy"> <button title="Copy to clipboard" data-copied="Copied!" data-code="import { AsyncResource, AsyncLocalStorage } from 'node:async_hooks';const als = new AsyncLocalStorage();class MyResource extends AsyncResource { constructor() { // The type string is required by Node.js but unused in Workers. super('MyResource'); } doSomething() { this.runInAsyncScope(() => { return als.getStore(); }); }};const myResource = als.run(123, () => new MyResource());console.log(myResource.doSomething()); // prints 123"> <div></div></button> </div> </figure> </div> <ul> <li><p><code>new AsyncResource(typestring, optionsAsyncResourceOptions)</code> : AsyncResource</p> <ul> <li>Returns a new <code dir="auto">AsyncResource</code>. Importantly, while the constructor arguments are required in Node.js' implementation of <code dir="auto">AsyncResource</code>, they are not used in Workers.</li> </ul></li> <li><code>AsyncResource.bind(fnfunction, typestring, thisArgany)</code> <ul> <li>Binds the given function to the current async context.</li> </ul></li> </ul> <div tabindex="-1" class="heading-wrapper level-h3"> <h3 id="methods-1">Methods</h3><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#methods-1"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <ul> <li><code>asyncResource.bind(fnfunction, thisArgany)</code> <ul> <li>Binds the given function to the async context associated with this <code dir="auto">AsyncResource</code>.</li> </ul></li> <li><code>asyncResource.runInAsyncScope(fnfunction, thisArgany, ...argsarguments)</code> <ul> <li>Call the provided function with the given arguments in the async context associated with this <code dir="auto">AsyncResource</code>.</li> </ul></li> </ul> <div tabindex="-1" class="heading-wrapper level-h2"> <h2 id="caveats">Caveats</h2><a class="anchor-link" href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#caveats"><span aria-hidden="true" class="anchor-icon"> <svg width="16" height="16" viewbox="0 0 24 24"> <path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z" /> </svg></span></a> </div> <ul> <li><p>The <code dir="auto">AsyncLocalStorage</code> implementation provided by Workers intentionally omits support for the <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/dist/latest-v18.x/docs/api/async_context.html%23asynclocalstorageenterwithstore" target="_blank" rel="noopener"><code dir="auto">asyncLocalStorage.enterWith()</code><span> ↗</span></a> and <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/dist/latest-v18.x/docs/api/async_context.html%23asynclocalstoragedisable" target="_blank" rel="noopener"><code dir="auto">asyncLocalStorage.disable()</code><span> ↗</span></a> methods.</p></li> <li><p>Workers does not implement the full <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/dist/latest-v18.x/docs/api/async_hooks.html" target="_blank" rel="noopener"><code dir="auto">async_hooks</code><span> ↗</span></a> API upon which Node.js' implementation of <code dir="auto">AsyncLocalStorage</code> is built.</p></li> <li><p>Workers does not implement the ability to create an <code dir="auto">AsyncResource</code> with an explicitly identified trigger context as allowed by Node.js. This means that a new <code dir="auto">AsyncResource</code> will always be bound to the async context in which it was created.</p></li> <li><p>Thenables (non-Promise objects that expose a <code dir="auto">then()</code> method) are not fully supported when using <code dir="auto">AsyncLocalStorage</code>. When working with thenables, instead use <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://nodejs.org/api/async_context.html%23static-method-asynclocalstoragesnapshot" target="_blank" rel="noopener"><code dir="auto">AsyncLocalStorage.snapshot()</code><span> ↗</span></a> to capture a snapshot of the current context.</p></li> </ul> <div class="feedback-prompt-content astro-cedpceuv"><feedback-prompt class="not-content astro-x6kpz2mu"> <div id="feedback-thumbs" class="astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">Was this helpful?</h2> <div class="not-content astro-x6kpz2mu"> <svg width="1em" height="1em" class="astro-x6kpz2mu" data-icon="material-symbols:thumb-up-outline-rounded"> <title>Yes</title><symbol id="ai:material-symbols:thumb-up-outline-rounded" viewbox="0 0 24 24"> <path fill="currentColor" d="M21 8q.8 0 1.4.6T23 10v2q0 .175-.05.375t-.1.375l-3 7.05q-.225.5-.75.85T18 21H7V8l6-5.95q.375-.375.888-.437t.987.187t.7.7t.1.925L14.55 8zM9 8.85V19h9l3-7v-2h-9l1.35-5.5zM4 21q-.825 0-1.412-.587T2 19v-9q0-.825.588-1.412T4 8h3v2H4v9h3v2zm5-2V8.85z" /> </symbol><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#ai:material-symbols:thumb-up-outline-rounded"></use> </svg> <svg width="1em" height="1em" class="astro-x6kpz2mu" data-icon="material-symbols:thumb-down-outline-rounded"> <title>No</title><symbol id="ai:material-symbols:thumb-down-outline-rounded" viewbox="0 0 24 24"> <path fill="currentColor" d="M3 16q-.8 0-1.4-.6T1 14v-2q0-.175.05-.375t.1-.375l3-7.05q.225-.5.75-.85T6 3h11v13l-6 5.95q-.375.375-.888.438t-.987-.188t-.7-.7t-.1-.925L9.45 16zm12-.85V5H6l-3 7v2h9l-1.35 5.5zM20 3q.825 0 1.413.588T22 5v9q0 .825-.587 1.413T20 16h-3v-2h3V5h-3V3zm-5 2v10.15z" /> </symbol><use href="https://developers-cloudflare-com.translate.goog/workers/runtime-apis/nodejs/asynclocalstorage/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB#ai:material-symbols:thumb-down-outline-rounded"></use> </svg> </div> </div> <div id="feedback-yes" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">What did you like?</h2> <form class="astro-x6kpz2mu"> <fieldset class="astro-x6kpz2mu"> <div class="astro-x6kpz2mu"><input type="radio" id="accurate" value="accurate" name="reason" class="astro-x6kpz2mu"> <label for="accurate" class="astro-x6kpz2mu">Accurate</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="easy-to-understand" value="easy-to-understand" name="reason" class="astro-x6kpz2mu"> <label for="easy-to-understand" class="astro-x6kpz2mu">Easy to understand</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="solved-my-problem" value="solved-my-problem" name="reason" class="astro-x6kpz2mu"> <label for="solved-my-problem" class="astro-x6kpz2mu">Solved my problem</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="helped-me-decide-to-use-the-product" value="solved-my-problem" name="reason" class="astro-x6kpz2mu"> <label for="helped-me-decide-to-use-the-product" class="astro-x6kpz2mu">Helped me decide to use the product</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="other" value="other" name="reason" class="astro-x6kpz2mu"> <label for="other" class="astro-x6kpz2mu">Other</label> <input type="text" placeholder="Tell us more about your experience." id="info" name="info" class="astro-x6kpz2mu"> </div><input type="submit" value="Submit" class="astro-x6kpz2mu"> </fieldset> </form> </div> <div id="feedback-no" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">What went wrong?</h2> <form class="astro-x6kpz2mu"> <fieldset class="astro-x6kpz2mu"> <div class="astro-x6kpz2mu"><input type="radio" id="hard-to-understand" value="hard-to-understand" name="reason" class="astro-x6kpz2mu"> <label for="hard-to-understand" class="astro-x6kpz2mu">Hard to understand</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="incorrect-information" value="incorrect-information" name="reason" class="astro-x6kpz2mu"> <label for="incorrect-information" class="astro-x6kpz2mu">Incorrect information</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="missing-the-information" value="missing-the-information" name="reason" class="astro-x6kpz2mu"> <label for="missing-the-information" class="astro-x6kpz2mu">Missing the information</label> </div> <div class="astro-x6kpz2mu"><input type="radio" id="other" value="other" name="reason" class="astro-x6kpz2mu"> <label for="other" class="astro-x6kpz2mu">Other</label> <input type="text" placeholder="Tell us more about your experience." id="info" name="info" class="astro-x6kpz2mu"> </div><input type="submit" value="Submit" class="astro-x6kpz2mu"> </fieldset> </form> </div> <div id="feedback-thanks" class="hidden astro-x6kpz2mu"> <h2 class="astro-x6kpz2mu">Thank you for helping improve Cloudflare's documentation!</h2> </div> </feedback-prompt> <script type="module">class r extends HTMLElement{connectedCallback(){const d={'[data-icon="material-symbols:thumb-up-outline-rounded"]':"#feedback-yes",'[data-icon="material-symbols:thumb-down-outline-rounded"]':"#feedback-no"},s=this.querySelector("#feedback-thumbs"),o=this.querySelector("#feedback-thanks");if(!(!s||!o))for(const[i,n]of Object.entries(d))this.querySelector(i)?.addEventListener("click",()=>{s.classList.add("hidden");const e=this.querySelector(n);if(!e)return;e.classList.remove("hidden");const a=e.querySelector("form");a&&a.addEventListener("submit",async c=>{c.preventDefault();const t=new FormData(c.target);t.set("page",window.location.pathname),t.set("option",n.split("-")[1]),fetch("https://feedback.developers.cloudflare.com",{method:"POST",body:t}),e.classList.add("hidden"),o.classList.remove("hidden")})})}}customElements.define("feedback-prompt",r);</script> </div> </div> <footer class="sl-flex astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/workers/runtime-apis/nodejs/asynclocalstorage.mdx" class="sl-flex astro-eez2twj6"> <svg aria-hidden="true" class="astro-eez2twj6 astro-c6vsoqas" width="16" height="16" viewbox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"> <path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z" /> </svg> Edit page</a> </div> <div class="pagination-links astro-u2l5gyhi" dir="ltr"> </div> </footer> <div class="items-center flex flex-wrap astro-fxeopwe4"> <a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://dash.cloudflare.com/?to%3D/:account/workers" class="mx-2 my-2 text-xs text-black dark:text-white decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"><span class="astro-fxeopwe4">Cloudflare Dashboard</span></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://discord.cloudflare.com" class="mx-2 my-2 text-xs text-black dark:text-white decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"><span class="astro-fxeopwe4">Discord</span></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://community.cloudflare.com" class="mx-2 my-2 text-xs text-black dark:text-white decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"><span class="astro-fxeopwe4">Community</span></a><a href="https://translate.google.com/website?sl=pl&amp;tl=en&amp;hl=en-GB&amp;u=https://www.cloudflare.com/learning/" class="mx-2 my-2 text-xs text-black dark:text-white decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"><span class="astro-fxeopwe4">Learning Center</span></a><a href="https://developers-cloudflare-com.translate.goog/support/contacting-cloudflare-support/?_x_tr_sl=pl&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB" class="mx-2 my-2 text-xs text-black dark:text-white decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"><span class="astro-fxeopwe4">Support Portal</span></a> <div class="mx-2 my-2 text-xs text-black dark:text-white underline decoration-accent-600 dark:decoration-accent-200 astro-fxeopwe4"> <script src="https://ot.www.cloudflare.com/public/vendor/onetrust/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="b1e05d49-f072-4bae-9116-bdb78af15448"></script> <script type="text/javascript"> function OptanonWrapper() {} </script><span class="DocsFooter--content-additional-wrapper astro-hwxmvrii"> <!-- OneTrust Cookies Settings button start --> <a role="button" id="ot-sdk-btn" class="ot-sdk-show-settings astro-hwxmvrii">Cookie Settings</a> <!-- OneTrust Cookies Settings button end --> </span> </div> </div> </div> </div> </main> </div> </div> </div> </div> <script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;rayId&quot;:&quot;8eb03839dddd5fe6&quot;,&quot;version&quot;:&quot;2024.10.5&quot;,&quot;serverTiming&quot;:{&quot;name&quot;:{&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfSpeedBrain&quot;:true,&quot;cfCacheStatus&quot;:true}},&quot;token&quot;:&quot;0589387b238e41af8aafea4d88cd2c64&quot;,&quot;b&quot;:1}" crossorigin="anonymous"></script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('pl', 'en', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&amp;hl=en-GB&amp;client=wt" type="text/javascript"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10