Skip to content

@lastshotlabs/slingshot-ssr

npm install @lastshotlabs/slingshot-ssr

Returns the AsyncLocalStorage constructor, or null on edge runtimes. Resolution order: globalThis polyfill → node:async_hooks → null.

function buildAfterFn(): (callback: () => void | Promise<void>) => void

Source: packages/slingshot-ssr/src/after/index.ts

Compile manifest page declarations into a route table.

The returned table is sorted by specificity so static routes win over dynamic ones, mirroring the file-system SSR resolver.

function buildPageChain(declaration: ResolvedPageDeclaration, params: Record<string, string>, url: URL, query: Record<string, string>,): SsrRouteChain

Source: packages/slingshot-ssr/src/pageResolver.ts

Compile manifest page declarations into a route table.

The returned table is sorted by specificity so static routes win over dynamic ones, mirroring the file-system SSR resolver.

function buildPageRouteTable(pages: Readonly<Record<string, PageDeclaration>>, entityConfigs: ReadonlyMap<string, ResolvedEntityConfig>,): readonly ResolvedPageDeclaration[]

Source: packages/slingshot-ssr/src/pageResolver.ts

The shape of a route module produced by defineRoute() and exported via the named-export pattern shown in the defineRoute JSDoc.

function clearRouteModuleCache(): void

Source: packages/slingshot-ssr/src/routeExecution.ts

Circuit breaker for external rendering dependencies in slingshot-ssr.

The circuit breaker protects the SSR render pipeline from cascading failures when external rendering dependencies (e.g. the renderer’s own page rendering, external API calls from loaders) become degraded or unavailable.

  • CLOSED (normal): requests pass through. Failures are counted.
  • OPEN (degraded): requests are rejected immediately without calling the protected function. A cooldown timer starts.
  • HALF_OPEN (probing): after the cooldown, one probe request is allowed. If it succeeds, the circuit closes. If it fails, the circuit re-opens.

This module provides both a generic CircuitBreaker interface and a concrete createCircuitBreaker() factory with sensible defaults for SSR.

function createCircuitBreaker(options: Partial<CircuitBreakerOptions> = {}): CircuitBreaker

Source: packages/slingshot-ssr/src/circuitBreaker.ts

Configuration for createFileBasedRouteSource.

function createFileBasedRouteSource(config: FileBasedRouteSourceConfig): SsrRouteSource

Source: packages/slingshot-ssr/src/routeSource/fileBased.ts

Create the Slingshot SSR package.

Registers SSR middleware, server action routes, metadata routes, and optional entity-driven page support when config.pages is supplied.

The package itself owns no entities — page routes are driven imperatively from setupMiddleware/setupRoutes/setupPost lifecycle hooks, so the definePackage input has empty entities: [].

function createSsrPackage(rawConfig: SsrPluginConfig): SlingshotPackageDefinition

Source: packages/slingshot-ssr/src/plugin.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

Source: packages/slingshot-ssr/src/resolver.ts

Returns the AsyncLocalStorage constructor, or null when running in an edge runtime that does not provide node:async_hooks.

Resolution order:

  1. globalThis.AsyncLocalStorage — edge adapters may polyfill this.
  2. require('node:async_hooks').AsyncLocalStorage — Node / Bun.
  3. null — edge runtime with no polyfill; draft mode degrades gracefully.

Source: packages/slingshot-ssr/src/draft/index.ts

Returns the AsyncLocalStorage constructor, or null when running in an edge runtime that does not provide node:async_hooks.

Resolution order:

  1. globalThis.AsyncLocalStorage — edge adapters may polyfill this.
  2. require('node:async_hooks').AsyncLocalStorage — Node / Bun.
  3. null — edge runtime with no polyfill; draft mode degrades gracefully.
function draftMode(): void

Source: packages/slingshot-ssr/src/draft/index.ts

Returns the AsyncLocalStorage constructor, or null on edge runtimes. Resolution order: globalThis polyfill → node:async_hooks → null.

async function drainAfterCallbacks(): Promise<void>

Source: packages/slingshot-ssr/src/after/index.ts

Generate static param sets for entity-driven page declarations.

Static list, create-form, and dashboard pages emit a single empty param set when their path contains no dynamic segments. Detail and edit-form pages enumerate entity records and map route param names to record field names.

async function generatePageStaticParams(declaration: ResolvedPageDeclaration, adapters: Readonly<Record<string, PageEntityAdapter>>,): Promise<StaticParamSet[]>

Source: packages/slingshot-ssr/src/static-params/pageStaticParams.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

function initRouteTree(serverRoutesDir: string): void

Source: packages/slingshot-ssr/src/resolver.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

function invalidateRouteTree(serverRoutesDir: string): void

Source: packages/slingshot-ssr/src/resolver.ts

Returns the AsyncLocalStorage constructor, or null when running in an edge runtime that does not provide node:async_hooks.

Resolution order:

  1. globalThis.AsyncLocalStorage — edge adapters may polyfill this.
  2. require('node:async_hooks').AsyncLocalStorage — Node / Bun.
  3. null — edge runtime with no polyfill; draft mode degrades gracefully.
function isDraftRequest(c: HonoContext): boolean

Source: packages/slingshot-ssr/src/draft/index.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

function isForbidden(result: SsrLoaderReturn): result is SsrForbiddenResult

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

function isLoadResult(result: SsrLoaderReturn): result is SsrLoadResult

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

function isNotFound(result: SsrLoaderReturn): result is SsrNotFoundResult

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

function isRedirect(result: SsrLoaderReturn): result is SsrRedirectResult

Source: packages/slingshot-ssr/src/types.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

function isRouteParamTooLargeError(err: unknown): err is RouteParamTooLargeError

Source: packages/slingshot-ssr/src/resolver.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

function isUnauthorized(result: SsrLoaderReturn): result is SsrUnauthorizedResult

Source: packages/slingshot-ssr/src/types.ts

Structural equivalent of PprShell from @lastshotlabs/snapshot/ssr.

async function prerenderPprShells(routes: readonly PprRouteDescriptor[], cache: PprCacheShape, extractShell: (element: ReactElement) => Promise<PprShellShape>,): Promise<void>

Source: packages/slingshot-ssr/src/ppr/index.ts

Context passed to metadata convention functions (sitemap, robots, manifest).

bsCtx is the slingshot instance context — pass it to requireEntityAdapter(...) from @lastshotlabs/slingshot-core to read data when generating a dynamic sitemap or per-environment robots/manifest.

Convention functions may ignore the argument entirely (the no-arg signature is still supported and back-compat).

function registerMetadataRoutes(app: unknown, serverRoutesDir: string): void

Source: packages/slingshot-ssr/src/metadata/index.ts

Context passed to metadata convention functions (sitemap, robots, manifest).

bsCtx is the slingshot instance context — pass it to requireEntityAdapter(...) from @lastshotlabs/slingshot-core to read data when generating a dynamic sitemap or per-environment robots/manifest.

Convention functions may ignore the argument entirely (the no-arg signature is still supported and back-compat).

function registerMetadataRoutesFromDir(app: unknown, metadataDir: string): void

Source: packages/slingshot-ssr/src/metadata/index.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

function resolveGlobalMiddlewarePath(serverRoutesDir: string): string | null

Source: packages/slingshot-ssr/src/resolver.ts

Compile manifest page declarations into a route table.

The returned table is sorted by specificity so static routes win over dynamic ones, mirroring the file-system SSR resolver.

function resolvePageDeclaration(pathname: string, routeTable: readonly ResolvedPageDeclaration[],): void

Source: packages/slingshot-ssr/src/pageResolver.ts

P-SSR-3: Validate at plugin setup time that every entity referenced by a page declaration has a registered adapter. Without this, missing adapters surface only when the page is requested, returning a 500. Catching at setup fails the plugin init with a descriptive message that includes the offending page route.

async function resolvePageLoader(declaration: ResolvedPageDeclaration, params: Readonly<Record<string, string>>, query: Readonly<Record<string, string>>, adapters: Readonly<Record<string, PageEntityAdapter>>, entityConfigs: ReadonlyMap<string, ResolvedEntityConfig>, navigation?: NavigationConfig,): Promise<PageLoaderResult>

Source: packages/slingshot-ssr/src/pageLoaders.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

function resolveRouteChain(pathname: string, serverRoutesDir: string, fromPath?: string, options: ResolveRouteOptions = {},): SsrRouteChain | null

Source: packages/slingshot-ssr/src/resolver.ts

Retry logic for page load failures in slingshot-ssr.

Provides a generic retry() function with exponential backoff and jitter. Used by the SSR middleware to retry renderer calls when they fail with retryable errors (network timeouts, 5xx responses from upstream APIs).

Non-retryable errors (e.g. validation errors, authentication failures) are re-thrown immediately without retrying.

async function retry<T>(fn: () => Promise<T>, options: Partial<RetryOptions> = {},): Promise<T>

Source: packages/slingshot-ssr/src/retry.ts

P-SSR-3: Validate at plugin setup time that every entity referenced by a page declaration has a registered adapter. Without this, missing adapters surface only when the page is requested, returning a 500. Catching at setup fails the plugin init with a descriptive message that includes the offending page route.

function validatePageAdapters(pages: Readonly<Record<string, PageDeclaration>>, adapters: Readonly<Record<string, PageEntityAdapter | undefined>>,): void

Source: packages/slingshot-ssr/src/pageLoaders.ts

Returns the AsyncLocalStorage constructor, or null on edge runtimes. Resolution order: globalThis polyfill → node:async_hooks → null.

function withAfterContext<T>(fn: () => Promise<T>): Promise<T>

Source: packages/slingshot-ssr/src/after/index.ts

Returns the AsyncLocalStorage constructor, or null when running in an edge runtime that does not provide node:async_hooks.

Resolution order:

  1. globalThis.AsyncLocalStorage — edge adapters may polyfill this.
  2. require('node:async_hooks').AsyncLocalStorage — Node / Bun.
  3. null — edge runtime with no polyfill; draft mode degrades gracefully.
function withDraftContext<T>(c: HonoContext, fn: () => T | Promise<T>): Promise<T>

Source: packages/slingshot-ssr/src/draft/index.ts

Public contract for slingshot-ssr.

Cross-package consumers (server actions, route handlers, peer plugins) resolve IsrInvalidatorsCap through ctx.capabilities.require(...) to invalidate paths and tags on the active ISR cache adapter.

Source: packages/slingshot-ssr/src/public.ts

Public contract for slingshot-ssr.

Cross-package consumers (server actions, route handlers, peer plugins) resolve IsrInvalidatorsCap through ctx.capabilities.require(...) to invalidate paths and tags on the active ISR cache adapter.

Source: packages/slingshot-ssr/src/public.ts

P-SSR-3: Validate at plugin setup time that every entity referenced by a page declaration has a registered adapter. Without this, missing adapters surface only when the page is requested, returning a 500. Catching at setup fails the plugin init with a descriptive message that includes the offending page route.

Source: packages/slingshot-ssr/src/pageLoaders.ts

Default maximum byte length of a single decoded route param.

Per spec — pluggable through SsrPluginConfig.maxRouteParamBytes. Requests whose decoded params exceed this cap are rejected with HTTP 414.

Source: packages/slingshot-ssr/src/resolver.ts

Subset of Vite’s manifest.json structure. Full spec: https://vitejs.dev/guide/backend-integration

Source: packages/slingshot-ssr/src/assets.ts

Circuit breaker for external rendering dependencies in slingshot-ssr.

The circuit breaker protects the SSR render pipeline from cascading failures when external rendering dependencies (e.g. the renderer’s own page rendering, external API calls from loaders) become degraded or unavailable.

  • CLOSED (normal): requests pass through. Failures are counted.
  • OPEN (degraded): requests are rejected immediately without calling the protected function. A cooldown timer starts.
  • HALF_OPEN (probing): after the cooldown, one probe request is allowed. If it succeeds, the circuit closes. If it fails, the circuit re-opens.

This module provides both a generic CircuitBreaker interface and a concrete createCircuitBreaker() factory with sensible defaults for SSR.

Source: packages/slingshot-ssr/src/circuitBreaker.ts

Circuit breaker for external rendering dependencies in slingshot-ssr.

The circuit breaker protects the SSR render pipeline from cascading failures when external rendering dependencies (e.g. the renderer’s own page rendering, external API calls from loaders) become degraded or unavailable.

  • CLOSED (normal): requests pass through. Failures are counted.
  • OPEN (degraded): requests are rejected immediately without calling the protected function. A cooldown timer starts.
  • HALF_OPEN (probing): after the cooldown, one probe request is allowed. If it succeeds, the circuit closes. If it fails, the circuit re-opens.

This module provides both a generic CircuitBreaker interface and a concrete createCircuitBreaker() factory with sensible defaults for SSR.

Source: packages/slingshot-ssr/src/circuitBreaker.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

Returns the AsyncLocalStorage constructor, or null when running in an edge runtime that does not provide node:async_hooks.

Resolution order:

  1. globalThis.AsyncLocalStorage — edge adapters may polyfill this.
  2. require('node:async_hooks').AsyncLocalStorage — Node / Bun.
  3. null — edge runtime with no polyfill; draft mode degrades gracefully.

Source: packages/slingshot-ssr/src/draft/index.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Configuration for createFileBasedRouteSource.

Source: packages/slingshot-ssr/src/routeSource/fileBased.ts

A single cached ISR page entry.

Stores the rendered HTML, response headers, and timing metadata needed to implement stale-while-revalidate logic. Both memory and Redis adapters use this shape — Redis serializes it as JSON.

Source: packages/slingshot-ssr/src/isr/types.ts

A single cached ISR page entry.

Stores the rendered HTML, response headers, and timing metadata needed to implement stale-while-revalidate logic. Both memory and Redis adapters use this shape — Redis serializes it as JSON.

Source: packages/slingshot-ssr/src/isr/types.ts

A single cached ISR page entry.

Stores the rendered HTML, response headers, and timing metadata needed to implement stale-while-revalidate logic. Both memory and Redis adapters use this shape — Redis serializes it as JSON.

Source: packages/slingshot-ssr/src/isr/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Structural equivalent of PprShell from @lastshotlabs/snapshot/ssr.

Source: packages/slingshot-ssr/src/ppr/index.ts

Structural equivalent of PprShell from @lastshotlabs/snapshot/ssr.

Source: packages/slingshot-ssr/src/ppr/index.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Per-call options for SsrRouteSource.resolve.

Source: packages/slingshot-ssr/src/routeSource/types.ts

Per-call options for SsrRouteSource.resolve.

Source: packages/slingshot-ssr/src/routeSource/types.ts

Retry logic for page load failures in slingshot-ssr.

Provides a generic retry() function with exponential backoff and jitter. Used by the SSR middleware to retry renderer calls when they fail with retryable errors (network timeouts, 5xx responses from upstream APIs).

Non-retryable errors (e.g. validation errors, authentication failures) are re-thrown immediately without retrying.

Source: packages/slingshot-ssr/src/retry.ts

Context passed to metadata convention functions (sitemap, robots, manifest).

bsCtx is the slingshot instance context — pass it to requireEntityAdapter(...) from @lastshotlabs/slingshot-core to read data when generating a dynamic sitemap or per-environment robots/manifest.

Convention functions may ignore the argument entirely (the no-arg signature is still supported and back-compat).

Source: packages/slingshot-ssr/src/metadata/index.ts

The shape of a route module produced by defineRoute() and exported via the named-export pattern shown in the defineRoute JSDoc.

Source: packages/slingshot-ssr/src/routeExecution.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Context passed to metadata convention functions (sitemap, robots, manifest).

bsCtx is the slingshot instance context — pass it to requireEntityAdapter(...) from @lastshotlabs/slingshot-core to read data when generating a dynamic sitemap or per-environment robots/manifest.

Convention functions may ignore the argument entirely (the no-arg signature is still supported and back-compat).

Source: packages/slingshot-ssr/src/metadata/index.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

Per-call options for SsrRouteSource.resolve.

Source: packages/slingshot-ssr/src/routeSource/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A single route that exports generateStaticParams, plus the pre-computed param sets returned by calling it at build time.

routePath uses the file-system-derived URL pattern (e.g. /players/[id]). paramSets is the array returned by the route’s generateStaticParams export.

Source: packages/slingshot-ssr/src/static-params/index.ts

Circuit breaker for external rendering dependencies in slingshot-ssr.

The circuit breaker protects the SSR render pipeline from cascading failures when external rendering dependencies (e.g. the renderer’s own page rendering, external API calls from loaders) become degraded or unavailable.

  • CLOSED (normal): requests pass through. Failures are counted.
  • OPEN (degraded): requests are rejected immediately without calling the protected function. A cooldown timer starts.
  • HALF_OPEN (probing): after the cooldown, one probe request is allowed. If it succeeds, the circuit closes. If it fails, the circuit re-opens.

This module provides both a generic CircuitBreaker interface and a concrete createCircuitBreaker() factory with sensible defaults for SSR.

Source: packages/slingshot-ssr/src/circuitBreaker.ts

Circuit breaker for external rendering dependencies in slingshot-ssr.

The circuit breaker protects the SSR render pipeline from cascading failures when external rendering dependencies (e.g. the renderer’s own page rendering, external API calls from loaders) become degraded or unavailable.

  • CLOSED (normal): requests pass through. Failures are counted.
  • OPEN (degraded): requests are rejected immediately without calling the protected function. A cooldown timer starts.
  • HALF_OPEN (probing): after the cooldown, one probe request is allowed. If it succeeds, the circuit closes. If it fails, the circuit re-opens.

This module provides both a generic CircuitBreaker interface and a concrete createCircuitBreaker() factory with sensible defaults for SSR.

Source: packages/slingshot-ssr/src/circuitBreaker.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

Serializable handler reference used in manifest-backed page declarations.

This mirrors the root manifest handler-ref shape without introducing a runtime dependency from slingshot-ssr back to the root package.

Source: packages/slingshot-ssr/src/pageDeclarations.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

A TanStack Query cache entry to pre-seed during SSR.

The queryKey array must match exactly the key used by the corresponding client-side useQuery() hook. On hydration, the client reads this entry from the dehydrated state and skips the network request.

Source: packages/slingshot-ssr/src/types.ts

The shape of a route module produced by defineRoute() and exported via the named-export pattern shown in the defineRoute JSDoc.

Source: packages/slingshot-ssr/src/routeExecution.ts

The shape of a route module produced by defineRoute() and exported via the named-export pattern shown in the defineRoute JSDoc.

Source: packages/slingshot-ssr/src/routeExecution.ts