CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-fluidframework--container-loader

Fluid container loader providing core container loading functionality for the Fluid Framework

57%

Overall

Evaluation57%

0.98x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-7/

Redirect-Aware Container Loader

Build a helper that loads Fluid containers while following service redirections and normalizing URLs into a compatible form for the underlying resolver/driver.

Capabilities

Redirected load handling

Handles at most one redirection hop; if no redirect occurs, the final URL matches the original request.

  • When an initial load responds with a redirect location, retry the load at the redirected URL and return the container from that target along with the final resolved URL. @test
  • If a redirect points to an incompatible or incomplete URL, surface an error that includes the redirect location and does not yield a container. @test

URL compatibility normalization

  • Given a shorthand or legacy Fluid URL, normalize it into the format expected by the resolver/driver and return both the original and normalized values. @test

Implementation

@generates

API

export interface LoadRequest {
  requestUrl: string;
  pauseSequenceNumber?: number;
}

export interface LoadResult {
  container: unknown;
  originalUrl: string;
  finalUrl: string;
}

export interface NormalizedUrl {
  originalUrl: string;
  compatibleUrl: string;
}

export class RedirectAwareLoader {
  constructor(deps: {
    resolveAndLoad(requestUrl: string, options?: { pauseSequenceNumber?: number }): Promise<{
      container: unknown;
      resolvedUrl: string;
      redirectLocation?: string;
    }>;
    normalizeUrl?(url: string): string;
  });

  load(request: LoadRequest): Promise<LoadResult>;

  normalize(requestUrl: string): NormalizedUrl;
}

Dependencies { .dependencies }

@fluidframework/container-loader { .dependency }

Provides container loading utilities with redirection handling and URL compatibility helpers.

tessl i tessl/npm-fluidframework--container-loader@2.60.0

tile.json