getClientAddress() — astro Function Reference
Architecture documentation for the getClientAddress() function in render-context.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8738ff41_9cb5_f0e0_abb2_ec740b39d0ad["getClientAddress()"] b7425a46_8c1f_1122_7ae3_a00e52db1d90["RenderContext"] 8738ff41_9cb5_f0e0_abb2_ec740b39d0ad -->|defined in| b7425a46_8c1f_1122_7ae3_a00e52db1d90 d91ba7de_e6ec_e3f2_d698_49f283edc9ab["createActionAPIContext()"] d91ba7de_e6ec_e3f2_d698_49f283edc9ab -->|calls| 8738ff41_9cb5_f0e0_abb2_ec740b39d0ad 0007f436_547e_7fd2_f341_1a05d84a40a6["createAstroPagePartial()"] 0007f436_547e_7fd2_f341_1a05d84a40a6 -->|calls| 8738ff41_9cb5_f0e0_abb2_ec740b39d0ad style 8738ff41_9cb5_f0e0_abb2_ec740b39d0ad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/render-context.ts lines 773–795
getClientAddress() {
const { pipeline, routeData, clientAddress } = this;
if (routeData.prerender) {
throw new AstroError({
...AstroErrorData.PrerenderClientAddressNotAvailable,
message: AstroErrorData.PrerenderClientAddressNotAvailable.message(routeData.component),
});
}
if (clientAddress) {
return clientAddress;
}
if (pipeline.adapterName) {
throw new AstroError({
...AstroErrorData.ClientAddressNotAvailable,
message: AstroErrorData.ClientAddressNotAvailable.message(pipeline.adapterName),
});
}
throw new AstroError(AstroErrorData.StaticClientAddressNotAvailable);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getClientAddress() do?
getClientAddress() is a function in the astro codebase, defined in packages/astro/src/core/render-context.ts.
Where is getClientAddress() defined?
getClientAddress() is defined in packages/astro/src/core/render-context.ts at line 773.
What calls getClientAddress()?
getClientAddress() is called by 2 function(s): createActionAPIContext, createAstroPagePartial.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free