ENGLISH·COURSE API
    Preparing search index...
    • Parses the text of a content-locations.json into a validated manifest.

      Parameters

      • text: string

        Raw file contents

      Returns {
          version: 1;
          stores: Record<
              string,
              | { driver: "local"; baseUrl: string; pathPrefix: string }
              | {
                  driver: "s3";
                  bucket: string;
                  region: string;
                  endpoint?: string;
                  forcePathStyle: boolean;
                  pathPrefix: string;
                  visibility: "public" | "signed";
                  publicUrl?: string;
                  signedUrlTtlSeconds?: number;
              }
              | {
                  driver: "gcs";
                  bucket: string;
                  apiEndpoint?: string;
                  pathPrefix: string;
                  visibility: "public"
                  | "signed";
                  publicUrl?: string;
                  signedUrlTtlSeconds?: number;
              },
          >;
          default: string;
          routes: { prefix: string; store: string }[];
          overrides: Record<string, string>;
          assets: Record<string, { store?: string; objectPath?: string }>;
      }

      The validated manifest, defaults applied

      • version: 1
      • stores: Record<
            string,
            | { driver: "local"; baseUrl: string; pathPrefix: string }
            | {
                driver: "s3";
                bucket: string;
                region: string;
                endpoint?: string;
                forcePathStyle: boolean;
                pathPrefix: string;
                visibility: "public" | "signed";
                publicUrl?: string;
                signedUrlTtlSeconds?: number;
            }
            | {
                driver: "gcs";
                bucket: string;
                apiEndpoint?: string;
                pathPrefix: string;
                visibility: "public"
                | "signed";
                publicUrl?: string;
                signedUrlTtlSeconds?: number;
            },
        >
      • default: string

        Store that answers for a key matching no override and no route.

      • routes: { prefix: string; store: string }[]
      • overrides: Record<string, string>

        Exact key → store name, for single assets that escape their prefix.

      • assets: Record<string, { store?: string; objectPath?: string }>

        Exact key → declared placement. Outranks every other layer.

      Throws rather than returning a Result: a manifest that does not describe reality has no safe interpretation, and the only sane response is to refuse to build the dependency graph. Falling back to defaults would serve every asset from the wrong place, silently.

      if text is not valid JSON, fails the schema, or names an undeclared store